Klockwork fixes on C samples
authorMandeep Shetty <mandeep.shetty@intel.com>
Tue, 17 Mar 2015 20:55:11 +0000 (13:55 -0700)
committerErich Keane <erich.keane@intel.com>
Mon, 30 Mar 2015 17:00:19 +0000 (17:00 +0000)
commitbbe6ea7b93285c7c35291a6db4b5da9aa57cf550
tree838568d5bef2947b75f2c2cdad37d0649ab1a8b5
parent25378fba1d0fbe7b0b2df63068c66ac76421a465
Klockwork fixes on C samples

Send MAX_HEADER_OPTION_DATA_LENGTH as buffer size to avoid array bounds
violation by potentially sending a larger size contained in the
optionLength field in received headers.

Change-Id: If9f6ea0688298a2ba7723db67f5082509fad1d5f
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/493
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp