Commit bf5cbff5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

avformat: Don't accept negative size.

parent 761871b1
...@@ -488,6 +488,7 @@ static int IORead( void *opaque, uint8_t *buf, int buf_size ) ...@@ -488,6 +488,7 @@ static int IORead( void *opaque, uint8_t *buf, int buf_size )
{ {
URLContext *p_url = opaque; URLContext *p_url = opaque;
demux_t *p_demux = p_url->priv_data; 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 ); int i_ret = stream_Read( p_demux->s, buf, buf_size );
return i_ret ? i_ret : -1; 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