From 2813d6860c8bdb6c29015b17fc5df67c8b7a776c Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Fri, 25 Oct 2019 13:19:42 +0200 Subject: [PATCH] Added MessageQueue_Dispatch argument checks --- winpr/libwinpr/utils/collections/MessageQueue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winpr/libwinpr/utils/collections/MessageQueue.c b/winpr/libwinpr/utils/collections/MessageQueue.c index 4cda990..3e269a7 100644 --- a/winpr/libwinpr/utils/collections/MessageQueue.c +++ b/winpr/libwinpr/utils/collections/MessageQueue.c @@ -70,6 +70,9 @@ BOOL MessageQueue_Wait(wMessageQueue* queue) BOOL MessageQueue_Dispatch(wMessageQueue* queue, wMessage* message) { BOOL ret = FALSE; + if (!queue || !message) + return FALSE; + EnterCriticalSection(&queue->lock); if (queue->size == queue->capacity) -- 2.7.4