From 104b516a13c3281e020fbaf751185b368baae5af Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 6 Nov 2022 13:34:28 +0100 Subject: [PATCH] avcodec/bonk: step cannot become 0 without overflowing which is undefined also the original reference code does not contain a 0 check Signed-off-by: Michael Niedermayer --- libavcodec/bonk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c index 1a7a063c0d..2b2e202428 100644 --- a/libavcodec/bonk.c +++ b/libavcodec/bonk.c @@ -203,8 +203,6 @@ static int intlist_read(BonkContext *s, int *buf, int entries, int base_2_part) } if (step < 256) { - if (step == 0) - return AVERROR_INVALIDDATA; step = 65536 / step; dominant = !dominant; }