From: Sourav Bhuwalka Date: Tue, 24 Dec 2019 18:11:09 +0000 (+0530) Subject: crash in NSConsumerMsgHandleThreadFunc X-Git-Tag: submit/tizen/20200121.084836~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf3210a426f75dfbbd298f0330bb7e0ab6e9418f;p=platform%2Fupstream%2Fiotivity.git crash in NSConsumerMsgHandleThreadFunc Before checking size of queue adding a check to see queue is null or not https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/2624fc610b13ad611d4bc73d5478c15382002940 (cherry-picked from 2624fc610b13ad611d4bc73d5478c15382002940) Change-Id: I099a627a45b042debcf1cc841cbcd3be20aeae79 Signed-off-by: Sudipto --- diff --git a/service/notification/src/consumer/NSConsumerQueue.c b/service/notification/src/consumer/NSConsumerQueue.c index 89495e7..4beaba0 100644 --- a/service/notification/src/consumer/NSConsumerQueue.c +++ b/service/notification/src/consumer/NSConsumerQueue.c @@ -102,5 +102,6 @@ int NSGetQueueSize(NSConsumerQueue * queue) bool NSIsQueueEmpty(NSConsumerQueue * queue) { + NS_VERIFY_NOT_NULL(queue, true); return (queue->size <= 0); }