[CONPRO-1560] iotivity crash in data receiver thread 88/225288/2
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:14:53 +0000 (09:14 +0900)
commit38c89116ed81b44e062b6acbb84094862a95ba85
tree65932f51f89d9b9448eaac3949225e2e962aa2e2
parent04c0a2f649a93d22dca70ad2cb9086d91d22331f
[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