crash in NSConsumerMsgHandleThreadFunc 56/221556/3
authorSourav Bhuwalka <s.bhuwalka@samsung.com>
Tue, 24 Dec 2019 18:11:09 +0000 (23:41 +0530)
committerPyun DoHyun <dh79.pyun@samsung.com>
Sun, 12 Jan 2020 23:06:08 +0000 (23:06 +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);
 }