Commit 189d6e7f authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Jean-Baptiste Kempf

avformat: Don't accept negative size.

(cherry picked from commit bf5cbff5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d20c5f54
......@@ -488,6 +488,7 @@ static int IORead( void *opaque, uint8_t *buf, int buf_size )
{
URLContext *p_url = opaque;
demux_t *p_demux = p_url->priv_data;
if( buf_size < 0 ) return -1;
int i_ret = stream_Read( p_demux->s, buf, buf_size );
return i_ret ? i_ret : -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment