mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
get_bits_long: fix variable type
This fixes a theoretical signed overflow Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
01aa664f21
commit
5f1c3c785c
@ -306,10 +306,10 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
|
|||||||
return get_bits(s, n);
|
return get_bits(s, n);
|
||||||
else {
|
else {
|
||||||
#ifdef BITSTREAM_READER_LE
|
#ifdef BITSTREAM_READER_LE
|
||||||
int ret = get_bits(s, 16);
|
unsigned ret = get_bits(s, 16);
|
||||||
return ret | (get_bits(s, n-16) << 16);
|
return ret | (get_bits(s, n-16) << 16);
|
||||||
#else
|
#else
|
||||||
int ret = get_bits(s, 16) << (n-16);
|
unsigned ret = get_bits(s, 16) << (n-16);
|
||||||
return ret | get_bits(s, n-16);
|
return ret | get_bits(s, n-16);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user