From 8615f74eac0d462635b6dac86642dc796f2832a2 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Mon, 30 Mar 2015 17:23:22 +0200 Subject: [PATCH] drdynvc: ensure stream != NULL --- channels/drdynvc/client/drdynvc_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 3fe2192ac..5a0ec2e17 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -969,7 +969,9 @@ static void drdynvc_virtual_channel_event_data_received(drdynvcPlugin* drdynvc, drdynvc->data_in = Stream_New(NULL, totalLength); } - data_in = drdynvc->data_in; + if (!(data_in = drdynvc->data_in)) + return; + if (!Stream_EnsureRemainingCapacity(data_in, (int) dataLength)) { Stream_Free(drdynvc->data_in, TRUE);