Iotivity crash on 502 Bad Gateway error 80/222680/1
authorSourav Bhuwalka <s.bhuwalka@samsung.com>
Fri, 10 Jan 2020 07:26:17 +0000 (12:56 +0530)
committerSudipto Bal <sudipto.bal@samsung.com>
Fri, 17 Jan 2020 06:52:19 +0000 (06:52 +0000)
commite6f8775d9b959d0103e3b74a381f12ff9e8979b2
tree2a720c958311bd2261ad9054cd6cbd23a9cd0ab6
parent42d3785f4383c9e743731abb018e2ba954b49b0c
Iotivity crash on 502 Bad Gateway error

Initialising dimensions with 0 which was not done earlier
In case OCRepPayloadGetPropObjectArray function fails links
become NULL but since dimensions is not initailised with 0 it will
have some garbage value and will enter in loop and crash will occur

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/649/commits/3a10bc1df11c5c2bbf7465e3aa06a76adb4734c6
(cherry-picked from 3a10bc1df11c5c2bbf7465e3aa06a76adb4734c6)

Change-Id: I9f156c9f3459ad756d3fde2759aa518d48380d54
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
(cherry picked from commit 176c9ded8f1aeb60bb2e6d9966d7b4253c1cd033)
resource/csdk/resource-directory/src/RDClient.cpp