[FFmpeg-cvslog] init_get_bits: fix off by 1 error
Michael Niedermayer
git at videolan.org
Mon Jan 14 16:36:27 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 14 16:29:27 2013 +0100| [7980cca05c7c72fc8b0be4268eea2e156e538228] | committer: Michael Niedermayer
init_get_bits: fix off by 1 error
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7980cca05c7c72fc8b0be4268eea2e156e538228
---
libavcodec/get_bits.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list