chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ff52cf
)
Fixing Integer Overflow in nlopt_srand_time
author
Mmanu Chaturvedi
<mmanu.chaturvedi@kitware.com>
Mon, 17 Jul 2017 15:38:30 +0000
(11:38 -0400)
committer
Mmanu Chaturvedi
<mmanu.chaturvedi@kitware.com>
Mon, 17 Jul 2017 15:38:30 +0000
(11:38 -0400)
api/general.c
patch
|
blob
|
history
diff --git
a/api/general.c
b/api/general.c
index 26af0d3b2576c2c4a6edd0cb59a57a3092f47d1e..672163d4e6899e897c49233fa5b9085e0111ec80 100644
(file)
--- a/
api/general.c
+++ b/
api/general.c
@@
-119,7
+119,7
@@
void NLOPT_STDCALL nlopt_srand(unsigned long seed) {
}
void NLOPT_STDCALL nlopt_srand_time(void) {
- nlopt_srand(nlopt_time_seed() + my_gettid() * 314159);
+ nlopt_srand(nlopt_time_seed() +
(unsigned long)
my_gettid() * 314159);
}
void nlopt_srand_time_default(void) {