null reference check in parseInvitePayload 38/29438/2
authorOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Tue, 16 Apr 2019 07:30:45 +0000 (10:30 +0300)
committerOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Tue, 16 Apr 2019 09:44:02 +0000 (09:44 +0000)
null reference check in parseInvitePayload

Change-Id: Ibf9377c97678c2eb5def6029e9c742a6f663de4a
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
resource/csdk/security/provisioning/src/cloud/aclinvite.c

index c760134..3d17c2d 100644 (file)
@@ -51,6 +51,8 @@ static OCStackResult parseInvitePayload(const OCRepPayload *payload, const char
     stringArray_t *gidlist = NULL;
     stringArray_t *midlist = NULL;
 
+    VERIFY_NON_NULL_RET(out, TAG, "out is NULL", OC_STACK_INVALID_PARAM);
+
     if (!OCRepPayloadGetPropObjectArray(payload, name, &helperPayload, dimensions))
     {
         OIC_LOG_V(ERROR, TAG, "Can't get: %s", name);