mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/golomb: fix reading huge signed rice golomb values
No testcase is known, nor any case where such huge values would occur Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c720b9ce98
commit
14c4b25158
@ -367,7 +367,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
|
||||
static inline int get_sr_golomb(GetBitContext *gb, int k, int limit,
|
||||
int esc_len)
|
||||
{
|
||||
int v = get_ur_golomb(gb, k, limit, esc_len);
|
||||
unsigned v = get_ur_golomb(gb, k, limit, esc_len);
|
||||
return (v >> 1) ^ -(v & 1);
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ static inline int get_sr_golomb(GetBitContext *gb, int k, int limit,
|
||||
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit,
|
||||
int esc_len)
|
||||
{
|
||||
int v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
|
||||
unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
|
||||
return (v >> 1) ^ -(v & 1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user