[IOT-994] Fixing crash for parsing arbitrary UTF-8 payload
authorMarkus Jung <markus.jung@samsung.com>
Mon, 11 Apr 2016 09:23:33 +0000 (18:23 +0900)
committerHabib Virji <habib.virji@samsung.com>
Tue, 19 Apr 2016 15:53:39 +0000 (15:53 +0000)
commitd8b26ad314250271d994b7e07efad4e3f7cf22b9
tree4710517c02c9b6af7248e0b1cd35cbb1c5c22f20
parent44b021b3fcaa25a3efd2034c08b330ebd7c17f18
[IOT-994] Fixing crash for parsing arbitrary UTF-8 payload

Avoid the crash by checking whether the cbortype is map.
Fundamentally, no-cbor type payload should be filtered in tinycbor library.
This change can be removed later.

Change-Id: Icde1422c61319d8c5e66675d9ef2b66f30dc4077
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7737
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Markus Jung <markus.jung85@gmail.com>
(cherry picked from commit d237eecb9b581157dee9c3314d5a07091b0078ed)
Reviewed-on: https://gerrit.iotivity.org/gerrit/7835
Reviewed-by: Habib Virji <habib.virji@samsung.com>
resource/csdk/stack/src/ocpayloadparse.c