[FFmpeg-cvslog] avcodec/put_bits: Assert that there is enough space left in skip_put_bytes ()

Michael Niedermayer git at videolan.org
Mon May 25 05:21:54 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 25 03:45:38 2015 +0200| [8f5ffed183e099128a732a00976f69fdc641d093] | committer: Michael Niedermayer

avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()

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

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

 libavcodec/put_bits.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 031db33..1a6f0af 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -229,6 +229,7 @@ static inline void skip_put_bytes(PutBitContext *s, int n)
 {
     av_assert2((put_bits_count(s) & 7) == 0);
     av_assert2(s->bit_left == 32);
+    av_assert0(n <= s->buf_end - s->buf_ptr);
     s->buf_ptr += n;
 }
 



More information about the ffmpeg-cvslog mailing list