tools/btgatt-server: Replace random number generation function
authorTedd Ho-Jeong An <tedd.an@intel.com>
Wed, 8 Dec 2021 22:39:21 +0000 (14:39 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000 (19:08 +0530)
commitcb67500f230c60a5fbde307ded024c0837c248c5
tree10d47adf08625e77158415595543f9476831c053
parent4c67917f935d2b8b7c44eb696f5a0be793ff1332
tools/btgatt-server: 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>
tools/btgatt-server.c