Fixed a bug of patch 16719
authorjs126.lee <js126.lee@samsung.com>
Thu, 16 Feb 2017 08:03:23 +0000 (17:03 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 17 Feb 2017 06:15:19 +0000 (06:15 +0000)
Issue : OicSecSvrType_t does not matched to GetSvrRownerId_t
        due to https://gerrit.iotivity.org/gerrit/#/c/16719.
        So, it's broken a checking permision logic with ResourceOwner

Patch 1 : Upload Patch
Patch 2 : Fixed typo

Change-Id: I84878994d7dbb03f208fb041b9be24ab889d8c26
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17311
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/policyengine.c

index 8376fdf..bd67af3 100644 (file)
@@ -242,7 +242,8 @@ OCStackResult GetSvcRownerId(OicUuid_t *rowner)
     return OC_STACK_ERROR;
 }
 
-static GetSvrRownerId_t GetSvrRownerId[OIC_SEC_SVR_TYPE_COUNT] = {
+static GetSvrRownerId_t GetSvrRownerId[OIC_SEC_SVR_TYPE_COUNT + 1] = {
+    NULL,
     GetAclRownerId,
     GetAmaclRownerId,
     GetCredRownerId,
@@ -569,4 +570,4 @@ void CheckPermission(SRMRequestContext_t *context)
     }
 
     return;
-}
\ No newline at end of file
+}