From 3ab60cd59158d0e53200b4ac6499eea712f7d325 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Fri, 15 Sep 2017 11:17:11 +0900 Subject: [PATCH] [4.0] Initialize random number generator - Call to function 'rand()' is insecure. Change-Id: I696e689ad6e02b5349c6546c4648a0aaff2c58d6 Signed-off-by: Seoyeon Kim --- dali/public-api/math/random.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dali/public-api/math/random.h b/dali/public-api/math/random.h index 8067112..97818f5 100644 --- a/dali/public-api/math/random.h +++ b/dali/public-api/math/random.h @@ -48,6 +48,7 @@ inline float Range(float f0, float f1) { float min = std::min(f0, f1); float max = std::max(f0, f1); + srand( time( NULL ) ); return min + (rand() & 0xfff) * (max-min) * (1.0f/4095.0f); } -- 2.7.4