Commit a7ef53d4 authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_filter/record.c: Read() return 0 on malloc failure.

If no memory could be allocated, then return 0 in Read() for this stream_filter.
VLC core will then neatly handle this error situation. Otherwise a buffer overflow
is triggered.
parent 6ef2bb61
......@@ -121,6 +121,9 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read )
if( p_sys->f && !p_record )
p_record = malloc( i_read );
if (!p_record)
return 0; /* VLC_ENOMEM */
/* */
const int i_record = stream_Read( s->p_source, p_record, i_read );
......
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