Remove broken validation check logic
authorJee Hyeok Kim <jihyeok13.kim@samsung.com>
Fri, 11 Mar 2016 07:57:26 +0000 (16:57 +0900)
committerJee Hyeok Kim <jihyeok13.kim@samsung.com>
Mon, 14 Mar 2016 01:31:41 +0000 (01:31 +0000)
If requestUri contains host string like 'coap+tcp://127.0.0.1:5683',

This function also adds host length to validate

regardless it is not affect packet size.

Change-Id: Id053ba6959181311d36d26a4b1a2853fb2e1af7d
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5717
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/src/ocstack.c

index 65aaa22..a5b7a66 100644 (file)
@@ -2471,13 +2471,6 @@ OCStackResult OCDoResource(OCDoHandle *handle,
     char *resourceUri = NULL;
     char *resourceType = NULL;
 
-    // This validation is broken, but doesn't cause harm
-    size_t uriLen = strlen(requestUri );
-    if ((result = verifyUriQueryLength(requestUri , uriLen)) != OC_STACK_OK)
-    {
-        goto exit;
-    }
-
     /*
      * Support original behavior with address on resourceUri argument.
      */