[IOT-2441] Initialize OCByteString.
authorTodd Malsbary <todd.malsbary@intel.com>
Thu, 22 Jun 2017 17:05:25 +0000 (10:05 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Fri, 30 Jun 2017 17:11:54 +0000 (17:11 +0000)
commit32d43503f45ca7b059097a77d8a1f06c653b8ca5
treeb3218634657baf618b6c45162d435455a71f1500
parent112a21c55345a6dc8ee2977106790085cbdf15e8
[IOT-2441] Initialize OCByteString.

OCByteStringCopy tries to free any existing
buffer.  When OCByteString is not initialized it
is possible to free an invalid pointer.

Bug: https://jira.iotivity.org/browse/IOT-2441
Change-Id: Ic5ebf559f4a33ffed7864163238bb304342b794a
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20959
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/src/ocpayload.c
service/notification/src/consumer/NSConsumerCommon.c