diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 16:29:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 16:35:41 +0100 |
commit | 7980cca05c7c72fc8b0be4268eea2e156e538228 (patch) | |
tree | 8e3a7bcd8d965b1dd8f9dc407f92186332886a58 | |
parent | 153fad14e5a2f85637aa6c254ced0fc1c68974e2 (diff) | |
download | ffmpeg-7980cca05c7c72fc8b0be4268eea2e156e538228.tar.gz |
init_get_bits: fix off by 1 error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/get_bits.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 964456ee5d..89df381fdb 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -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; |