[FFmpeg-cvslog] avcodec/put_bits: Assert that size in set_put_bits_buffer_size() does not cause integer overflows
Michael Niedermayer
git at videolan.org
Mon May 25 11:50:54 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May 25 05:31:26 2015 +0200| [bd46e78aa4e7fe003f647491c475f6b1a56d1743] | committer: Michael Niedermayer
avcodec/put_bits: Assert that size in set_put_bits_buffer_size() does not cause integer overflows
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd46e78aa4e7fe003f647491c475f6b1a56d1743
---
libavcodec/put_bits.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 1a6f0af..5b1bc8b 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -252,6 +252,7 @@ static inline void skip_put_bits(PutBitContext *s, int n)
*/
static inline void set_put_bits_buffer_size(PutBitContext *s, int size)
{
+ av_assert0(size <= INT_MAX/8 - 32);
s->buf_end = s->buf + size;
s->size_in_bits = 8*size;
}
More information about the ffmpeg-cvslog
mailing list