Adding NULL checking input parameter in SRMRequestHandler
[platform/upstream/iotivity.git] / resource / csdk / security / src / secureresourcemanager.c
index 4c41799..a91b10f 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)