/ Check-in [54a1d275]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a sprintf() problem introduced by (3916). (CVS 3927)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 54a1d275aa0154a88d433a3c4df538d52c2c3ecb
User & Date: drh 2007-05-05 12:06:24
Context
2007-05-05
18:39
Factor out btree test logic into a separate test_btree.c file. (CVS 3928) check-in: d51274f1 user: drh tags: trunk
12:06
Fix a sprintf() problem introduced by (3916). (CVS 3927) check-in: 54a1d275 user: drh tags: trunk
11:48
Refactoring. Split btreeInt.h off from btree.c. Split malloc.c off from util.c. Expect much more to follow. (CVS 3926) check-in: ad549a40 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

   942    942       }else{
   943    943         return SQLITE_NOMEM;
   944    944       }
   945    945     }
   946    946     for(i=strlen(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){}
   947    947     zTempPath[i] = 0;
   948    948     for(;;){
   949         -    sqlite3_snprintf(sizeof(zBuf), zBuf, "%s\\"TEMP_FILE_PREFIX, zTempPath);
          949  +    sqlite3_snprintf(SQLITE_TEMPNAME_SIZE, zBuf,
          950  +                     "%s\\"TEMP_FILE_PREFIX, zTempPath);
   950    951       j = strlen(zBuf);
   951    952       sqlite3Randomness(15, &zBuf[j]);
   952    953       for(i=0; i<15; i++, j++){
   953    954         zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
   954    955       }
   955    956       zBuf[j] = 0;
   956    957       if( !sqlite3OsFileExists(zBuf) ) break;