You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -144,6 +144,7 @@ static void flush_buffer(AVIOContext *s)
|
|||||||
|
|
||||||
void avio_w8(AVIOContext *s, int b)
|
void avio_w8(AVIOContext *s, int b)
|
||||||
{
|
{
|
||||||
|
av_assert2(b>=-128 && b<=255);
|
||||||
*s->buf_ptr++ = b;
|
*s->buf_ptr++ = b;
|
||||||
if (s->buf_ptr >= s->buf_end)
|
if (s->buf_ptr >= s->buf_end)
|
||||||
flush_buffer(s);
|
flush_buffer(s);
|
||||||
|
Reference in New Issue
Block a user