diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 16:29:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-19 17:59:23 +0100 |
commit | 1135928903325f48c0cedf1e9b793061965c1558 (patch) | |
tree | 86c23cfc0481010e50a68eee086b109e62068c1e /libavcodec | |
parent | 6f3bc92c294b4ce903047e1fd43d71e59c86337b (diff) | |
download | ffmpeg-1135928903325f48c0cedf1e9b793061965c1558.tar.gz |
init_get_bits: fix off by 1 error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7980cca05c7c72fc8b0be4268eea2e156e538228)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-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; |