[IOT-1925] ACE provisioning should fail
authorakk0rd <v.riznyk@samsung.com>
Fri, 11 Aug 2017 17:52:59 +0000 (20:52 +0300)
committerRandeep Singh <randeep.s@samsung.com>
Thu, 31 Aug 2017 09:42:17 +0000 (09:42 +0000)
ACE provisioning should fail if interface length is 0

Change-Id: Ibe09302d6769eff90403fd130b5f88195ac32cac
Signed-off-by: akk0rd <v.riznyk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21895
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/provisioning/src/ocprovisioningmanager.c

index ea9dd84..90210f5 100644 (file)
@@ -374,6 +374,12 @@ OCStackResult OC_CALL OCProvisionACL(void* ctx, const OCProvisionDev_t *selected
                 aclVersion = OIC_SEC_ACL_V2;
                 break;
             }
+            OicSecRsrc_t* rsrc = NULL;
+            LL_FOREACH(ace->resources, rsrc)
+            {
+                if(0 >= rsrc->interfaceLen)
+                    return OC_STACK_INVALID_PARAM;
+            }
         }
     }