projects
/
platform
/
upstream
/
iotivity.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b531639
)
1. Added a check in ocstack.c for the Maximum JSON payload that can be sent.
author
Omkar Hegde
<omkar.m.hegde@intel.com>
Mon, 6 Oct 2014 16:40:00 +0000
(09:40 -0700)
committer
Erich Keane
<erich.keane@intel.com>
Wed, 8 Oct 2014 17:28:45 +0000
(10:28 -0700)
2. Added specific error message to result. Changes in if() as suggested.
4. Replaced tab with spaces and moved the check before any processing begins.
Change-Id: Id06ce2f7deaf643acd4f3cf4fcdd9ce30e2eddbc
csdk/stack/src/ocstack.c
patch
|
blob
|
history
diff --git
a/csdk/stack/src/ocstack.c
b/csdk/stack/src/ocstack.c
index
ebaae39
..
4138c58
100644
(file)
--- a/
csdk/stack/src/ocstack.c
+++ b/
csdk/stack/src/ocstack.c
@@
-415,6
+415,12
@@
OCStackResult OCDoResource(OCDoHandle *handle, OCMethod method, const char *requ
goto exit;
}
+ if((request) && (strlen(request) > MAX_REQUEST_LENGTH))
+ {
+ result = OC_STACK_INVALID_PARAM;
+ goto exit;
+ }
+
requestUri = (unsigned char *) OCMalloc(uriLen + 1);
if(requestUri)
{