diff options
author | Nir Ben David <nirbenda@gmail.com> | 2011-11-10 23:03:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-10 23:09:44 +0100 |
commit | 083d9ba448e5290e71a513f027a1534e438918ab (patch) | |
tree | 8a0685393a8175bf3d43e4104b458f78173f2c28 /libavcodec | |
parent | a14708d4acd5ef53a635126479c0522944dd1d03 (diff) | |
download | ffmpeg-083d9ba448e5290e71a513f027a1534e438918ab.tar.gz |
golomb: Fix overread in get_ur_golomb_jpegls()
Fixes Ticket600
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/golomb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 8dff0322a7..d92bc40ee7 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -302,6 +302,8 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int }else{ int i; for(i=0; SHOW_UBITS(re, gb, 1) == 0; i++){ + if (get_bits_left(gb)<=0) + return -1; LAST_SKIP_BITS(re, gb, 1); UPDATE_CACHE(re, gb); } |