/ Check-in [70685b2a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 Unified Diffs Show Whitespace Changes Patch

Changes to src/os_os2.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This file contains code that is specific to OS/2.
**
** $Id: os_os2.c,v 1.51 2008/07/16 19:30:37 pweilbacher Exp $
*/

#include "sqliteInt.h"

#if SQLITE_OS_OS2

/*
................................................................................
static int os2FullPathname(
  sqlite3_vfs *pVfs,          /* Pointer to vfs object */
  const char *zRelative,      /* Possibly relative input path */
  int nFull,                  /* Size of output buffer in bytes */
  char *zFull                 /* Output buffer */
){
  char *zRelativeCp = convertUtf8PathToCp( zRelative );
  char zFullCp[CCHMAXPATH];
  char *zFullUTF;
  APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
                                CCHMAXPATH );
  free( zRelativeCp );
  zFullUTF = convertCpPathToUtf8( zFullCp );
  sqlite3_snprintf( nFull, zFull, zFullUTF );
  free( zFullUTF );







|







 







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This file contains code that is specific to OS/2.
**
** $Id: os_os2.c,v 1.52 2008/07/18 05:36:28 pweilbacher Exp $
*/

#include "sqliteInt.h"

#if SQLITE_OS_OS2

/*
................................................................................
static int os2FullPathname(
  sqlite3_vfs *pVfs,          /* Pointer to vfs object */
  const char *zRelative,      /* Possibly relative input path */
  int nFull,                  /* Size of output buffer in bytes */
  char *zFull                 /* Output buffer */
){
  char *zRelativeCp = convertUtf8PathToCp( zRelative );
  char zFullCp[CCHMAXPATH] = "\0";
  char *zFullUTF;
  APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
                                CCHMAXPATH );
  free( zRelativeCp );
  zFullUTF = convertCpPathToUtf8( zFullCp );
  sqlite3_snprintf( nFull, zFull, zFullUTF );
  free( zFullUTF );