Fixing crash in ocrandom.c (#516) 57/208357/1
authorsamanway.dey@samsung.com <samanway.dey@samsung.com>
Tue, 11 Jun 2019 18:32:40 +0000 (00:02 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 24 Jun 2019 00:51:14 +0000 (09:51 +0900)
commit54a630f76c7854d28d724949b2a012e7259f6f71
tree28fa97c2d7c2bc39e198680ed3762abc61ce1d3b
parentc7a91560fa56c3df3ace6e42d8bb1aa3ff0725b7
Fixing crash in ocrandom.c (#516)

* Fixing crash in ocrandom.c

-In function OCFillRandomMem() in ocrandom.c, location array was filled by incrementing the pointer. As a result,
the base pointer was pointing out the last byte of memory chunk instead of pointing the beginning of the array.

Signed-off-by: Samanway Dey <samanway.dey@samsung.com>
* Update ocrandom.c

Iterating till i > 1 for random swaps.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/516
(cherry picked from 643d922896dfeaf5f3d829009bd1d5b09654d93b)

Change-Id: I8031d4cf5cc22c682ff5c0df607c78e276923bcf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
resource/c_common/ocrandom/src/ocrandom.c