fix bug 12832 -- nasty buffer overrun showing up in release builds only

This commit is contained in:
morse%netscape.com 1999-09-02 09:18:57 +00:00
Родитель 5ae3371682
Коммит 385c63cebc
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);
}