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>
This commit is contained in:
Michael Niedermayer 2022-11-06 13:34:28 +01:00
parent 5df8c300a9
commit 104b516a13
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 0 additions and 2 deletions

View File

@ -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;
}