ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sun Nov 6 11:26:51 2022 +0100| [32631852259a8aeb845c39ed7fa707c6e102c40a] | committer: Michael Niedermayer
avcodec/bonk: Check step against overflow No testcase Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32631852259a8aeb845c39ed7fa707c6e102c40a --- libavcodec/bonk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c index d2571e56d4..b56a940681 100644 --- a/libavcodec/bonk.c +++ b/libavcodec/bonk.c @@ -180,6 +180,8 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) if (!dominant) n_zeros += steplet; + if (step > INT32_MAX*8LL/9 + 1) + return AVERROR_INVALIDDATA; step += step / 8; } else if (steplet > 0) { int actual_run = read_uint_max(s, steplet - 1); _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
