/ Check-in [9719a063]
Login

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

Overview
Comment:fix case in os2GetTempname() where none of the usual environment variables are set to not overwrite two unrelated bytes (CVS 4648)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9719a063942256e34395868d974ed2d53b81b697
User & Date: pweilbacher 2007-12-30 23:38:01
Context
2008-01-01
05:49
Define SQLITE_CORE=1 at the start of the amalgamation file for the benefit of any extension source code (i.e. fts3) appended to it. Ticket #2858. (CVS 4649) check-in: 6dea8c16 user: danielk1977 tags: trunk
2007-12-30
23:38
fix case in os2GetTempname() where none of the usual environment variables are set to not overwrite two unrelated bytes (CVS 4648) check-in: 9719a063 user: pweilbacher tags: trunk
23:35
simplify os2FullPathname() and at the same time make the allocations more robust (CVS 4647) check-in: 6f8952a8 user: pweilbacher tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

   743    743   */
   744    744   static int os2GetTempname( sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
   745    745     static const unsigned char zChars[] =
   746    746       "abcdefghijklmnopqrstuvwxyz"
   747    747       "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   748    748       "0123456789";
   749    749     int i, j;
   750         -  PSZ zTempPath = "";
          750  +  char zTempPathBuf[3];
          751  +  PSZ zTempPath = (PSZ)&zTempPathBuf;
   751    752     if( DosScanEnv( (PSZ)"TEMP", &zTempPath ) ){
   752    753       if( DosScanEnv( (PSZ)"TMP", &zTempPath ) ){
   753    754         if( DosScanEnv( (PSZ)"TMPDIR", &zTempPath ) ){
   754    755              ULONG ulDriveNum = 0, ulDriveMap = 0;
   755    756              DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap );
   756    757              sprintf( (char*)zTempPath, "%c:", (char)( 'A' + ulDriveNum - 1 ) );
   757    758         }