profiles/health: Replace random number generation function
authorTedd Ho-Jeong An <tedd.an@intel.com>
Wed, 8 Dec 2021 22:39:23 +0000 (14:39 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000 (19:08 +0530)
commit8db6703e5254ccd1e269ddd9c2aa38989efa0b6c
treebbe115d60386cad10c9946388e75dddf42d94bee
parentaebb2681d7029c9600162b840bf4d6aababd937e
profiles/health: Replace random number generation function

This patch replaces the rand() function to the getrandom() syscall.

It was reported by the Coverity scan
  rand() should not be used for security-related applications, because
  linear congruential algorithms are too easy to break

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/health/hdp.c
profiles/health/mcap.c