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:
2
src/os.c
2
src/os.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user