Michael Niedermayer: > Fixes: signed integer overflow: 2147483565 + 128 cannot be represented in > type 'int' > Fixes: > 428055715/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6358069900804096 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > --- > libavcodec/osq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/osq.c b/libavcodec/osq.c > index 76090aa8d07..1d99ab32451 100644 > --- a/libavcodec/osq.c > +++ b/libavcodec/osq.c > @@ -390,7 +390,7 @@ static int osq_decode_block(AVCodecContext *avctx, > AVFrame *frame) > int32_t *src = s->decode_buffer[ch] + OFFSET; > > for (int n = 0; n < nb_samples; n++) > - dst[n] = av_clip_uint8(src[n] + 0x80); > + dst[n] = av_clip_uint8(src[n] + 0x80ll); > } > break; > case AV_SAMPLE_FMT_S16P:
Why do you use a 64bit intermediate instead of simply using unsigned like we do everywhere else? - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".