diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-30 02:37:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-30 02:37:40 +0200 |
commit | 5f1c3c785c786f3c78c350d4503fcfd794fa3c64 (patch) | |
tree | 80a6bd2174fab1b1431852f38b0fa0b5a0e5f618 | |
parent | 01aa664f215345cddd57a3dcea2740ac0d0daf5f (diff) | |
download | ffmpeg-5f1c3c785c786f3c78c350d4503fcfd794fa3c64.tar.gz |
get_bits_long: fix variable type
This fixes a theoretical signed overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/get_bits.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index d926f57575..0aabca23cc 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 } |