summaryrefslogtreecommitdiffstats
path: root/libavcodec/get_bits.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-14 16:29:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-14 16:35:41 +0100
commit7980cca05c7c72fc8b0be4268eea2e156e538228 (patch)
tree8e3a7bcd8d965b1dd8f9dc407f92186332886a58 /libavcodec/get_bits.h
parent153fad14e5a2f85637aa6c254ced0fc1c68974e2 (diff)
downloadffmpeg-streaming-7980cca05c7c72fc8b0be4268eea2e156e538228.zip
ffmpeg-streaming-7980cca05c7c72fc8b0be4268eea2e156e538228.tar.gz
init_get_bits: fix off by 1 error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/get_bits.h')
-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 964456e..89df381 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;
OpenPOWER on IntegriCloud