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 <michael@niedermayer.cc>
pull/388/head
Michael Niedermayer 2 years ago
parent 5df8c300a9
commit 104b516a13
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      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 < 256) {
if (step == 0)
return AVERROR_INVALIDDATA;
step = 65536 / step; step = 65536 / step;
dominant = !dominant; dominant = !dominant;
} }

Loading…
Cancel
Save