Browse Source

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>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
8a34b85fa8
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/aviobuf.c

+ 1
- 0
libavformat/aviobuf.c View File

@@ -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);


Loading…
Cancel
Save