1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Use the buffer size as limit for temp file names. This is done for windows too, see check-in (4595). (CVS 4771)

FossilOrigin-Name: 99275bcd624c57585fc962235082fb0ca213d9c0
This commit is contained in:
pweilbacher
2008-02-01 19:44:28 +00:00
parent dc965c3c81
commit 6ee442bcc9
3 changed files with 8 additions and 9 deletions

View File

@@ -760,8 +760,7 @@ static int os2GetTempname( sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
j--;
}
zTempPath[j] = '\0';
assert( nBuf>=pVfs->mxPathname );
sqlite3_snprintf( pVfs->mxPathname-30, zBuf,
sqlite3_snprintf( nBuf-30, zBuf,
"%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPath );
j = strlen( zBuf );
sqlite3Randomness( 20, &zBuf[j] );