diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-15 16:02:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 15:42:00 +0200 |
commit | 8a34b85fa8ded31d9f0572f902c2bcbf3a2e0b74 (patch) | |
tree | 3814cfe9f620ae37830aab0074be49094598b9ab /libavformat | |
parent | a3fb3a670e8c4db6d6a3db9139245189ae55e289 (diff) | |
download | ffmpeg-8a34b85fa8ded31d9f0572f902c2bcbf3a2e0b74.tar.gz |
avio: detect implicit truncation by assert in avio_w*
This check is somewhat more lenient as would be ideal because we dont
know if the input is signed or unsigned
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aviobuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 3748818ad5..906415dbac 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -144,6 +144,7 @@ static void flush_buffer(AVIOContext *s) void avio_w8(AVIOContext *s, int b) { + av_assert2(b>=-128 && b<=255); *s->buf_ptr++ = b; if (s->buf_ptr >= s->buf_end) flush_buffer(s); |