[CONPRO-1560] iotivity crash in data receiver thread 81/225281/1
authorsamanway <samanway@linux-samanway.sa.corp.samsungelectronics.net>
Wed, 5 Feb 2020 11:14:29 +0000 (16:44 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 19 Feb 2020 00:11:13 +0000 (09:11 +0900)
commit6410f7a2a9d95eda15c643c248e1af0970da4bf5
treed8731357b53fb87e021083fe6bdd8ffed62ce0d8
parenta799ea01410a8eaeb47804be44928e966634636f
[CONPRO-1560] iotivity crash in data receiver thread

- In function CADropSecondMessage(), an input argument pointer NULL check was missing, added the same
- In function CAGetInfoFromPDU(), 512 bytes memory was getting assingned from stack, which may fail in case stack overflow.
Hence allocated memory from heap. this fix is already in IoTivity 2.0-rel.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/663
(cherry-picked from 7c12ddb7711cbb9af9d7c68635c171692222bdb4)

Change-Id: I09e987240e7d37460ba7c567f7b6593d6b3b9e3a
Signed-off-by: samanway-dey <samanway.dey@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/caprotocolmessage.c