[FFmpeg-cvslog] get_bits_long: fix variable type
Michael Niedermayer
git at videolan.org
Sun Sep 30 02:47:46 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 30 02:37:40 2012 +0200| [5f1c3c785c786f3c78c350d4503fcfd794fa3c64] | committer: Michael Niedermayer
get_bits_long: fix variable type
This fixes a theoretical signed overflow
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f1c3c785c786f3c78c350d4503fcfd794fa3c64
---
libavcodec/get_bits.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index d926f57..0aabca2 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -306,10 +306,10 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
return get_bits(s, n);
else {
#ifdef BITSTREAM_READER_LE
- int ret = get_bits(s, 16);
+ unsigned ret = get_bits(s, 16);
return ret | (get_bits(s, n-16) << 16);
#else
- int ret = get_bits(s, 16) << (n-16);
+ unsigned ret = get_bits(s, 16) << (n-16);
return ret | get_bits(s, n-16);
#endif
}
More information about the ffmpeg-cvslog
mailing list