From: js126.lee Date: Wed, 11 Jan 2017 04:48:25 +0000 (+0900) Subject: Adding NULL checking input parameter in SRMRequestHandler X-Git-Tag: submit/tizen_3.0/20171212.092431^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_3.0;p=platform%2Fupstream%2Fiotivity.git Adding NULL checking input parameter in SRMRequestHandler Patch 1: upload patch Change-Id: I869fd8d2d3198033be3cb36fe4fa1e7f602ba823 Signed-off-by: js126.lee Reviewed-on: https://gerrit.iotivity.org/gerrit/16299 Reviewed-by: Joonghwan Lee Reviewed-by: dongik Lee Reviewed-by: Chul Lee Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- diff --git a/resource/csdk/security/src/secureresourcemanager.c b/resource/csdk/security/src/secureresourcemanager.c index 4c41799..a91b10f 100644 --- a/resource/csdk/security/src/secureresourcemanager.c +++ b/resource/csdk/security/src/secureresourcemanager.c @@ -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)