Crash in OCProcessPresence() 17/175817/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:33:38 +0000 (18:03 +0530)
commitea735e63f4fa93c8168e41bc62370fb8b600564f
tree3f274d71482bdae45a198fe4d72f6c965a42f449
parent3a81dcdacc476109d0d423040e2dd663de470a6e
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: I9398fa4870a719eb0bbaa00102157e8487af5236
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
resource/csdk/stack/src/ocstack.c