crash in NSConsumerMsgHandleThreadFunc 02/221602/1
authorSourav Bhuwalka <s.bhuwalka@samsung.com>
Tue, 24 Dec 2019 18:11:09 +0000 (23:41 +0530)
committerSudipto Bal <sudipto.bal@samsung.com>
Mon, 6 Jan 2020 05:43:33 +0000 (05:43 +0000)
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 <sudipto.bal@samsung.com>
service/notification/src/consumer/NSConsumerQueue.c

index 89495e7..4beaba0 100644 (file)
@@ -102,5 +102,6 @@ int NSGetQueueSize(NSConsumerQueue * queue)
 
 bool NSIsQueueEmpty(NSConsumerQueue * queue)
 {
+    NS_VERIFY_NOT_NULL(queue, true);
     return (queue->size <= 0);
 }