aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-21 00:28:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-21 00:28:39 +0100
commitfc739b79ad7d0c360782a3193f4e6f9c30147707 (patch)
tree81d44bd03f0fab1c2d7be2fabfc2adf9a53ab844 /libavcodec
parent7feb7f16a80a8d8754d2b32228f08470ecee2dca (diff)
downloadffmpeg-fc739b79ad7d0c360782a3193f4e6f9c30147707.tar.gz
golomb: fix end of bitstream check
Fixes Ticket806 Bug found by Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/golomb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index d92bc40ee7..14cf05504f 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -302,7 +302,7 @@ 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)
+ if (gb->size_in_bits <= re_index)
return -1;
LAST_SKIP_BITS(re, gb, 1);
UPDATE_CACHE(re, gb);