From da39686a310cb40185095aa214ad0dc24cf6e04b Mon Sep 17 00:00:00 2001 From: TaGUNil Date: Tue, 9 Dec 2014 19:28:13 +0300 Subject: [PATCH] channels/urbdrc: fix segfault Fix segmentation fault in urbdrc_main.c caused by missing memset. --- channels/urbdrc/client/urbdrc_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index e87966932..d037c76b0 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -908,6 +908,8 @@ static int urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallb URBDRC_CHANNEL_CALLBACK* callback; WLog_VRB(TAG, ""); callback = (URBDRC_CHANNEL_CALLBACK*) malloc(sizeof(URBDRC_CHANNEL_CALLBACK)); + memset(callback, 0, sizeof(URBDRC_CHANNEL_CALLBACK)); + callback->iface.OnDataReceived = urbdrc_on_data_received; callback->iface.OnClose = urbdrc_on_close; callback->plugin = listener_callback->plugin;