Crash in OCProcessPresence() 20/175820/1
authorVeeraj Khokale <veeraj.sk@samsung.com>
Fri, 6 Apr 2018 09:03:12 +0000 (14:33 +0530)
committerAmit KS <amit.s12@samsung.com>
Thu, 12 Apr 2018 12:40:35 +0000 (18:10 +0530)
commitc44fdb080d7fa27b666a888f08d6e0ace02152e2
tree0e92b7c3e1f0f18cfea97d93df60d132ea6a98b8
parentcc6b59ec861cc5ce01b5c48ebed914fb547d488e
Crash in OCProcessPresence()

1. Set presence to NULL incase allocation of timeout
array fails. This ensures that OCProcessPresence does
not process this cbNode, thereby preventing possible
NULL dereference of timeout.
2. Do not send request if timeout has reached/exceeded
the  PresenceTimeOutSize. This prevents a possible buffer
overrun in accessing the timeout array.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/279
(cherry picked from commit 22079af2bd0f22a80b98c3b17469c3b8ed601ede)

Change-Id: I27ec81c8ff5f9d887c8308e2042f744e6fabee29
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
resource/csdk/stack/src/ocstack.c