Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-14 19:29:27 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-19 20:59:23 +0400
commit1135928903325f48c0cedf1e9b793061965c1558 (patch)
tree86c23cfc0481010e50a68eee086b109e62068c1e
parent6f3bc92c294b4ce903047e1fd43d71e59c86337b (diff)
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>
-rw-r--r--libavcodec/get_bits.h2
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;