From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A244F485B8 for ; Sat, 6 Jul 2024 09:26:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 97AB068DB30; Sat, 6 Jul 2024 12:26:09 +0300 (EEST) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2090968D6BB for ; Sat, 6 Jul 2024 12:26:03 +0300 (EEST) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-58c947a6692so3084686a12.0 for ; Sat, 06 Jul 2024 02:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720257962; x=1720862762; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=laaHtpLlm55sFJT9Hvr3PM/bQRoSnOWupBfvYntqeR0=; b=SRPm3NXhT7ZwBbM42tmDYR2WPUxxEi7G6j8blXTtBMqE9UW5x4H4L9BEjxFQ8Rm396 k+/wg60Tm7ybzZC+/PL7xTdD1aQ4olz83yPDwIAj3cGNZYgBjY598fWoSG0zotlw0tPa GOHfp4tg8JchWyjQmCs2a+7LrK8rc1Rp9DgcTwZITnCl15R7RxiCzoL7gMJ2t9tku25x eJaxYNDyJsRi7K0PZE9O+V5neEICpWU1ssPp6JofpD8oapRUdFX0upkat6q30xBf0lbL WCM0w+XtjlOcRtQ11LagJyBqS4OmC1CXv+rmS6D+yAvharf3LishLwBrtv6IWPR+BA9D 3NWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720257962; x=1720862762; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=laaHtpLlm55sFJT9Hvr3PM/bQRoSnOWupBfvYntqeR0=; b=JQjeGinWrVFRYwBb/6dnlqlSeEI/BCp4R8ecwFel2J3ZbA5vu3pnqilnVDqFl/W6Rc RL7fDfrcYPU/bxx88pHxHmUNAh8WekGehxZVhTDebUAmS0dwEnHMtBGC6MrL3d1pPlDe cYSOuyVauCqs/SntRz2wgsmS9MclVOy0Jr+5u7Z9ehwFXBt8/8VEDmqRMX7gioqVhHLy pO4td1ctkfKKRUY3icGaLBzuL4KPOt48qi1wJ53qG3yE+Mr9Bvm4eKNdYvlE7JgyaC4y mZGHMjFGAoM794VpJD8f9U5aZlEmj5/DComOYhm7I2JRJ4YpU04q9T8qZY/eUf0wCAXJ VTzA== X-Gm-Message-State: AOJu0YxUaj5bJYB3JKZYPank1ix9al5keeetfh3KgWw73VpUnnLS1elG ou62oua2FLvSbGeeX70mLZNfxV/e8l7qhbReHghx1xSi8sTHDzpKYlNKeRDo5Ko= X-Google-Smtp-Source: AGHT+IGLIb/K+V/XoEh8SwuHoFCXA2gQBBQshhyzUcjkt6syV8OzuHqJ8+Abq4vFjc0HcKp43GnRpw== X-Received: by 2002:a05:6402:2695:b0:57d:61a:7f20 with SMTP id 4fb4d7f45d1cf-58e5a8e6a60mr5836379a12.3.1720257961848; Sat, 06 Jul 2024 02:26:01 -0700 (PDT) Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it. [84.220.189.10]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58c9061becfsm4657932a12.83.2024.07.06.02.26.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 02:26:01 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 67573BFCE8; Sat, 6 Jul 2024 11:26:00 +0200 (CEST) Date: Sat, 6 Jul 2024 11:26:00 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH] lavfi/perlin: Fix out of bounds stack buffer write X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Tuesday 2024-07-02 20:38:00 +0200, Marvin Scholz wrote: > An incorrect calculation in ff_perlin_init causes a write to the > stack array at index 256, which is out of bounds. > > Fixes: CID1608711 > --- > libavfilter/perlin.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/perlin.c b/libavfilter/perlin.c > index 09bae7ad33..ffad8c1e4e 100644 > --- a/libavfilter/perlin.c > +++ b/libavfilter/perlin.c > @@ -129,7 +129,7 @@ int ff_perlin_init(FFPerlin *perlin, double period, int octaves, double persiste > for (i = 0; i < 256; i++) { > unsigned int random_idx = av_lfg_get(&lfg) % (256-i); > uint8_t random_val = random_permutations[random_idx]; > - random_permutations[random_idx] = random_permutations[256-i]; > + random_permutations[random_idx] = random_permutations[255-i]; > > perlin->permutations[i] = perlin->permutations[i+256] = random_val; > } Looks good, thanks. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".