A fix for a bug reported by Omkar and Vijay:
authorYamin S Al-mousa <yamin.s.al-mousa@intel.com>
Fri, 19 Sep 2014 17:56:47 +0000 (10:56 -0700)
committerYamin S Al-mousa <yamin.s.al-mousa@intel.com>
Fri, 19 Sep 2014 17:56:47 +0000 (10:56 -0700)
The check for required uri lenght should consider that it includes the uri and query.

Change-Id: I1ca3e4709de02cb4f5217aba5133b8aa2bc4ee14

csdk/stack/src/ocstack.c

index c8cb91e..99111ef 100644 (file)
@@ -362,7 +362,7 @@ OCStackResult OCDoResource(OCDoHandle *handle, OCMethod method, const char *requ
             goto exit;
     }
 
-    if(strlen(requiredUri) > MAX_URI_LENGTH)
+    if(strlen(requiredUri) > MAX_URI_LENGTH + MAX_QUERY_LENGTH)
     {
         result = OC_STACK_INVALID_PARAM;
         goto exit;