diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-17 19:08:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-17 19:36:38 +0200 |
commit | 14c4b2515836811d53bb5696951637537353387f (patch) | |
tree | fc1a7b17470154f97dd81f0c5d3825bd6d4ea989 | |
parent | c720b9ce9850710e74a103d9626869e397a89faa (diff) | |
download | ffmpeg-14c4b2515836811d53bb5696951637537353387f.tar.gz |
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>
-rw-r--r-- | libavcodec/golomb.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 134e6aca47..d8c1a4145e 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -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); } |