Harden parsing of CBOR to ensure types are accurate
TinyCBOR requires that the caller ensure that the type of the entry
pointed by CborValue be of the correct type before extracting the
value. Otherwise, bad things happen (failed assertions in debug mode).
This fixes IOT-1722.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I2bc52f3c7a574209b213fffd1498a48851c9c5d8
Reviewed-on: https://gerrit.iotivity.org/gerrit/16309
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: byonggon chun <bg.chun@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>