Java DeviceInfo never uses the optional OCDeviceInfo fields,
these must be set to NULL to avoid potential corrupt data.
Change-Id: I7eda3be60d17591ab6169c0d487784c474f6325d
Signed-off-by: ljsachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10165
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
}
OCDeviceInfo deviceInfo;
+ memset(&deviceInfo, 0, sizeof(deviceInfo));
try
{
DuplicateString(&deviceInfo.deviceName, env->GetStringUTFChars(jDeviceName, nullptr));
- deviceInfo.types = NULL;
jsize len = env->GetArrayLength(jDeviceTypes);
for (jsize i = 0; i < len; ++i)