summaryrefslogtreecommitdiff
path: root/libavcodec/bonk.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-11-06 13:34:28 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-11-14 21:52:51 +0100
commit104b516a13c3281e020fbaf751185b368baae5af (patch)
tree29c99fb49de855df6f9cf8615329fefcdc5a3289 /libavcodec/bonk.c
parent5df8c300a915cd0fa1f337ce36957624593928df (diff)
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>
Diffstat (limited to 'libavcodec/bonk.c')
-rw-r--r--libavcodec/bonk.c2
1 files changed, 0 insertions, 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;
}