diff options
| author | fvogel <fvogelnew1@free.fr> | 2019-05-13 09:54:49 (GMT) |
|---|---|---|
| committer | fvogel <fvogelnew1@free.fr> | 2019-05-13 09:54:49 (GMT) |
| commit | 6b6e030ea49677db8df33c856429465459e58f9a (patch) | |
| tree | af5a4f59002ec1564936b58bf454047b7987da03 | |
| parent | 6902811461c2a7091cc7b076cfad37eeb155fdf3 (diff) | |
| download | tcl-6b6e030ea49677db8df33c856429465459e58f9a.zip tcl-6b6e030ea49677db8df33c856429465459e58f9a.tar.gz tcl-6b6e030ea49677db8df33c856429465459e58f9a.tar.bz2 | |
Fix crashing bug in tempdir name creation
| -rw-r--r-- | win/tclWinFCmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 57ffa53..2531ba6 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -2043,7 +2043,7 @@ TclpCreateTemporaryDirectory( error = ERROR_SUCCESS; tempbuf[SUFFIX_LENGTH] = '\0'; for (i = 0 ; i < SUFFIX_LENGTH; i++) { - tempbuf[i] = randChars[(int) (rand() * numRandChars)]; + tempbuf[i] = randChars[(int) (rand() % numRandChars)]; } Tcl_DStringSetLength(&base, baseLen); TclUtfToWCharDString(tempbuf, -1, &base); |
