Apr 28, 2024, 23:31 by mich...@niedermayer.cc: > Inspired by CID1465483 Unintentional integer overflow > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > --- > libavcodec/aaccoder.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c > index 4ce54ca8867..6e5817e237b 100644 > --- a/libavcodec/aaccoder.c > +++ b/libavcodec/aaccoder.c > @@ -178,6 +178,8 @@ static av_always_inline float > quantize_and_encode_band_cost_template( > int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q, ROUNDING), 13); > int len = av_log2(coef); > > + av_assert2(len >= 4); > + > put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2); > put_sbits(pb, len, coef); > } >
I'm not sure that's correct to do. Any specific cases where this happens? _______________________________________________ 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".