Fix for IOT-1214: Incorrect use of tinyCBOR API in security code
authorKishen Maloor <kishen.maloor@intel.com>
Mon, 15 Aug 2016 01:22:10 +0000 (18:22 -0700)
committerZiran Sun <ziran.sun@samsung.com>
Tue, 13 Sep 2016 14:22:48 +0000 (14:22 +0000)
commita909e871afe8a9ea7e0a779302e4d47dac74649d
treeece1ba8870d4bb6e3450bdd8f39bca417dfa02e8
parent5f69a9319e7ac63f15d04801dbf75b2edb03c060
Fix for IOT-1214: Incorrect use of tinyCBOR API in security code

mapSize is consistently larger than the actual size of doxmMap.
This results in an erroneous parse of the resulting payload wherein
the last key-value pair is truncated.

When creating containers, we must specify CborIndefiniteLength unless
we know the exact length the container.

Change-Id: I8beb6bc45ae41531e8a7528d9dbd254a27e14be9
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10455
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/security/src/doxmresource.c