Adding NULL checking input parameter in SRMRequestHandler
authorjs126.lee <js126.lee@samsung.com>
Wed, 11 Jan 2017 04:48:25 +0000 (13:48 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Mon, 16 Jan 2017 03:38:50 +0000 (03:38 +0000)
Patch 1: upload patch

Change-Id: I869fd8d2d3198033be3cb36fe4fa1e7f602ba823
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16299
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 4728815858d3a7e4f990dd99cf888f8d4a00f921)
Reviewed-on: https://gerrit.iotivity.org/gerrit/16301

resource/csdk/security/src/secureresourcemanager.c

index dc682b4..32427cb 100644 (file)
@@ -152,6 +152,12 @@ void SRMRequestHandler(const CAEndpoint_t *endPoint, const CARequestInfo_t *requ
     }
 
     //Check the URI has the query and skip it before checking the permission
+    if (NULL == requestInfo->info.resourceUri)
+    {
+        OIC_LOG(ERROR, TAG, "Invalid resourceUri");
+        return;
+    }
+
     char *uri = strstr(requestInfo->info.resourceUri, "?");
     int position = 0;
     if (uri)