projects
/
platform
/
core
/
uifw
/
dali-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae7cd90
)
Initialize random number generator
48/150248/1
author
Seoyeon Kim
<seoyeon2.kim@samsung.com>
Fri, 15 Sep 2017 02:17:11 +0000
(11:17 +0900)
committer
Seoyeon Kim
<seoyeon2.kim@samsung.com>
Fri, 15 Sep 2017 02:22:19 +0000
(11:22 +0900)
- Call to function 'rand()' is insecure.
Change-Id: I696e689ad6e02b5349c6546c4648a0aaff2c58d6
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/public-api/math/random.h
patch
|
blob
|
history
diff --git
a/dali/public-api/math/random.h
b/dali/public-api/math/random.h
index
8067112
..
97818f5
100644
(file)
--- 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);
}