Commit 585acfa0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Avoid passing a NULL buffer to wg_parser_push_data() in the case…

winegstreamer: Avoid passing a NULL buffer to wg_parser_push_data() in the case of a zero-length read. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 59997c35
......@@ -613,9 +613,12 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct media_source *source = arg;
IMFByteStream *byte_stream = source->byte_stream;
size_t buffer_size = 0;
size_t buffer_size = 4096;
uint64_t file_size;
void *data = NULL;
void *data;
if (!(data = malloc(buffer_size)))
return 0;
IMFByteStream_GetLength(byte_stream, &file_size);
......
......@@ -786,9 +786,12 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct parser *filter = arg;
LONGLONG file_size, unused;
size_t buffer_size = 0;
size_t buffer_size = 4096;
void *data = NULL;
if (!(data = malloc(buffer_size)))
return 0;
IAsyncReader_Length(filter->reader, &file_size, &unused);
TRACE("Starting read thread for filter %p.\n", filter);
......
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