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 2CE0B44B64 for ; Sun, 6 Nov 2022 18:31:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A37D68B9B7; Sun, 6 Nov 2022 20:31:31 +0200 (EET) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 237A568B680 for ; Sun, 6 Nov 2022 20:31:25 +0200 (EET) Received: by mail-vs1-f52.google.com with SMTP id t14so8720442vsr.9 for ; Sun, 06 Nov 2022 10:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ywy1+VwRW5vraKhI2jztAI4KY1Cl4BQaRkqbP4U+JwQ=; b=WDXYkR34SIo6HKtlN4WRiZOOPdu3dGsidIlIen8C9VhuAt/LWn1xfZSvhkCtAuCcvp E6lMv82pxaV/KlCN9+vZZSuBzMaX06iSuscouVQ9dNrhjZlPG5zz8IUtYGZJ7izMXsWr pxbYURMaBLbgmhcuNsgUAwUbifmr2OAZLLYgLhq+n26/w+rtwISnIWnZneDK4ps+rypc Nx3R460s8zuOD40J4h8obtF0ewFeOLses7couSqXzV06g6wZfejZYjHVDbKZYxI74uNh rGHyfT8o2Amt/4DG2qJGUbf1dzsDDRF/Om1h6R5ahnZsiiyijozu12cjSYd+dWhPmTA3 qvJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ywy1+VwRW5vraKhI2jztAI4KY1Cl4BQaRkqbP4U+JwQ=; b=Ql47F4cA36KKnVs+DfqPe6fNSBhFuVbIRysWi87rI9BaksSvpCMtJBIeXBfmLRSaAX nLrm59naNMUg3WEMTPDoHeX0Z/jY9MzJ8iPjPvEnGLLEKarHVkfFodgKkQm9k26mfVKT C/PxwGwkjsVNJaUJQ5armSgd2I5+WCIa5J0NWQFqQNGWtxNf23ml6DF/G4VRLECrWsnd FRlDWVkadZHbRhggmubqSFZYJDdvcC21a9otpELvnrD8KxFPkwX+Upd3BcDtfa7Rzd1G j71H5PqVrCo/CivUfN5ME35N/SAoM1qoHaiIDEw1JAypRcRfTzAq2gjcgxDK9isAd6MH XkcA== X-Gm-Message-State: ACrzQf1FDrIiliURP2AnQix4MwVFuJnYq6uZ88Jgnr8g/ts4XO5AsnHo qSpPutyKvBH3rX0ffvcouzGpOSfA+q8P8EFkWS90f7MU X-Google-Smtp-Source: AMsMyM57zcW7owFniaEE3cOpxNGo68FVTJyjTAWtKkbwufAKJQFden9Azq623IYFgEtYuxUxHCnLdwdymXHxoxo2a+s= X-Received: by 2002:a67:d50c:0:b0:3aa:3ebf:6b73 with SMTP id l12-20020a67d50c000000b003aa3ebf6b73mr24035808vsj.15.1667759483882; Sun, 06 Nov 2022 10:31:23 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:612c:612:b0:314:ac6a:1eb7 with HTTP; Sun, 6 Nov 2022 10:31:23 -0800 (PST) In-Reply-To: <20221106123430.1668-1-michael@niedermayer.cc> References: <20221106123430.1668-1-michael@niedermayer.cc> From: Paul B Mahol Date: Sun, 6 Nov 2022 19:31:23 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 1/7] avcodec/bonk: Use unsigned in predictor_calc_error() to avoid undefined overflows 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 11/6/22, Michael Niedermayer wrote: > Fixes: signed integer overflow: 22 * -2107998208 cannot be represented in > type 'int' > Fixes: > 51363/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5660734784143360 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/bonk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c > index 1695229dbd..9e8892e4db 100644 > --- a/libavcodec/bonk.c > +++ b/libavcodec/bonk.c > @@ -278,7 +278,7 @@ static int predictor_calc_error(int *k, int *state, int > order, int error) > *state_ptr = &(state[order-2]); > > for (i = order-2; i >= 0; i--, k_ptr--, state_ptr--) { > - int k_value = *k_ptr, state_value = *state_ptr; > + unsigned k_value = *k_ptr, state_value = *state_ptr; > > x -= shift_down(k_value * state_value, LATTICE_SHIFT); > state_ptr[1] = state_value + shift_down(k_value * x, > LATTICE_SHIFT); > -- > 2.17.1 > probably fine. > _______________________________________________ > 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". > _______________________________________________ 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".