зеркало из https://github.com/mozilla/pjs.git
fix bug 12832 -- nasty buffer overrun showing up in release builds only
This commit is contained in:
Родитель
5ae3371682
Коммит
385c63cebc
|
@ -1207,8 +1207,8 @@ Wallet_RandomName(char* suffix)
|
|||
/* pick the current time as the random number */
|
||||
time_t curTime = time(NULL);
|
||||
|
||||
/* take 8 least-significant digits as the file name */
|
||||
char name[9];
|
||||
/* take 8 least-significant digits + three-digit suffix as the file name */
|
||||
char name[13];
|
||||
PR_snprintf(name, 13, "%lu.%s", (curTime%100000000), suffix);
|
||||
return PL_strdup(name);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче