/ Check-in [70685b2a]
Login

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

Overview
Comment:Init zFullCp to prevent crashes in case DosQueryPathInfo() fails. (CVS 5435)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 70685b2ae8bbb8ab4316a762e1c1cc59b8032e0b
User & Date: pweilbacher 2008-07-18 05:36:28
Context
2008-07-18
08:10
Speed up sqlite3_finalize() by removing redundant code. (CVS 5436) check-in: c94318b9 user: danielk1977 tags: trunk
05:36
Init zFullCp to prevent crashes in case DosQueryPathInfo() fails. (CVS 5435) check-in: 70685b2a user: pweilbacher tags: trunk
03:32
The zeroPage() routine in btree.c need not actually zero the whole page, just the header. (CVS 5434) check-in: c69633ec user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to OS/2.
    14     14   **
    15         -** $Id: os_os2.c,v 1.51 2008/07/16 19:30:37 pweilbacher Exp $
           15  +** $Id: os_os2.c,v 1.52 2008/07/18 05:36:28 pweilbacher Exp $
    16     16   */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   
    20     20   #if SQLITE_OS_OS2
    21     21   
    22     22   /*
................................................................................
   892    892   static int os2FullPathname(
   893    893     sqlite3_vfs *pVfs,          /* Pointer to vfs object */
   894    894     const char *zRelative,      /* Possibly relative input path */
   895    895     int nFull,                  /* Size of output buffer in bytes */
   896    896     char *zFull                 /* Output buffer */
   897    897   ){
   898    898     char *zRelativeCp = convertUtf8PathToCp( zRelative );
   899         -  char zFullCp[CCHMAXPATH];
          899  +  char zFullCp[CCHMAXPATH] = "\0";
   900    900     char *zFullUTF;
   901    901     APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
   902    902                                   CCHMAXPATH );
   903    903     free( zRelativeCp );
   904    904     zFullUTF = convertCpPathToUtf8( zFullCp );
   905    905     sqlite3_snprintf( nFull, zFull, zFullUTF );
   906    906     free( zFullUTF );