avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 25 May 2015 01:45:38 +0000 (03:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 25 May 2015 03:14:02 +0000 (05:14 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/put_bits.h

index 031db33..1a6f0af 100644 (file)
@@ -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;
 }