init_get_bits: fix off by 1 error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
153fad14e5
commit
7980cca05c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user