Fixed bad memory allocation, which was causing corruption
authorErich Keane <erich.keane@intel.com>
Thu, 18 Dec 2014 22:52:20 +0000 (14:52 -0800)
committerErich Keane <erich.keane@intel.com>
Fri, 19 Dec 2014 23:27:25 +0000 (15:27 -0800)
commit78e3f7669d281193b7a9d3b322368a5041f1ee44
treeb2d90c12d56837a5e3a785f7ac80d6931fdbe745
parent38bb33bd1bdfb9ec221b134eafc8636f1a9d14b0
Fixed bad memory allocation, which was causing corruption

Previously the stack was allocating based on a variable that was
never actually set, and despite that was likely allocating based on
the incorrect data.  This patch ensures that the allocation is
based on the actual size of the string.

Change-Id: Ie2feafe665b870919e17222dade5548794b6ce67
Signed-off-by: Erich Keane <erich.keane@intel.com>
resource/csdk/occoap/src/occoap.c
resource/csdk/stack/include/internal/ocserverrequest.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/src/ocserverrequest.c
resource/csdk/stack/src/ocstack.c