Commit 6ab6ab61 authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_filter/httplive.c: Bail out if block_Realloc() fails in AccessDownload().

If block_Realloc() fails in the function AccessDownload() then resolving
segment->data->i_buffer results in a segmentation error. Instead of continuing
when block_Realloc() has failed, just cleanup and leave the function.
parent 7b794661
......@@ -1087,7 +1087,11 @@ static int AccessDownload(stream_t *s, segment_t *segment)
{
msg_Dbg(s, "size changed %"PRIu64, segment->size);
segment->data = block_Realloc(segment->data, 0, p_sys->p_access->info.i_size);
if (segment->data)
if (segment->data == NULL)
{
AccessClose(s);
return VLC_ENOMEM;
}
segment->size = p_sys->p_access->info.i_size;
assert(segment->data->i_buffer == segment->size);
}
......
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