1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Make sure temporary file names in windows have a full 15 characters of

random text at the end. (CVS 1059)

FossilOrigin-Name: 6ccb92b14f2e6e01bb60dac10331fa7be0b4525e
This commit is contained in:
drh
2003-07-22 00:39:13 +00:00
parent 7b58daeafe
commit 4d87325d61
3 changed files with 8 additions and 8 deletions

View File

@@ -647,7 +647,7 @@ int sqliteOsTempFileName(char *zBuf){
sprintf(zBuf, "%s\\"TEMP_FILE_PREFIX, zTempPath);
j = strlen(zBuf);
for(i=0; i<15; i++){
int n = sqliteRandomByte() % sizeof(zChars);
int n = sqliteRandomByte() % (sizeof(zChars) - 1);
zBuf[j++] = zChars[n];
}
zBuf[j] = 0;