Commit 7980cca0 authored by Michael Niedermayer's avatar Michael Niedermayer

init_get_bits: fix off by 1 error

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 153fad14
......@@ -379,7 +379,7 @@ static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
int buffer_size;
int ret = 0;
if (bit_size > INT_MAX - 7 || bit_size < 0) {
if (bit_size >= INT_MAX - 7 || bit_size < 0) {
buffer_size = bit_size = 0;
buffer = NULL;
ret = AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment