[FFmpeg-cvslog] golomb: fix end of bitstream check

Michael Niedermayer git at videolan.org
Wed Dec 21 00:54:28 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 21 00:28:39 2011 +0100| [fc739b79ad7d0c360782a3193f4e6f9c30147707] | committer: Michael Niedermayer

golomb: fix end of bitstream check
Fixes Ticket806
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc739b79ad7d0c360782a3193f4e6f9c30147707
---

 libavcodec/golomb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index d92bc40..14cf055 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);



More information about the ffmpeg-cvslog mailing list