aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-25 03:45:38 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-28 02:33:56 +0200
commit4ac8b94a73218aa176226a431a222a1946199e7c (patch)
tree571778c4884fec4e3d185055cab832b7013639b6
parente83d99863418104adb1ea12825a19343ced5227c (diff)
downloadffmpeg-4ac8b94a73218aa176226a431a222a1946199e7c.tar.gz
avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8f5ffed183e099128a732a00976f69fdc641d093) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/put_bits.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 8dbbd094df..08f6826ee3 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -230,6 +230,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;
}