/ Check-in [e4943adb]
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:Make sure the output of sqlite3OsFullPathname is initialized even if the fails due to I/O or OOM errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e4943adb83819dee06e2e9da25ff6d967ca170de
User & Date: drh 2009-11-16 23:36:34
Context
2009-11-17
18:31
Code generator tries to avoid pointless OP_IsNull and OP_Affinity opcodes. check-in: ebb0c8a3 user: drh tags: trunk
2009-11-16
23:36
Make sure the output of sqlite3OsFullPathname is initialized even if the fails due to I/O or OOM errors. check-in: e4943adb user: drh tags: trunk
22:54
Fix a reference to freed memory that can occur following an OOM error in where.c. check-in: 929b6047 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os.c.

134
135
136
137
138
139
140

141
142
143
144
145
146
147
}
int sqlite3OsFullPathname(
  sqlite3_vfs *pVfs, 
  const char *zPath, 
  int nPathOut, 
  char *zPathOut
){

  return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);
}
#ifndef SQLITE_OMIT_LOAD_EXTENSION
void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
  return pVfs->xDlOpen(pVfs, zPath);
}
void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){







>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
}
int sqlite3OsFullPathname(
  sqlite3_vfs *pVfs, 
  const char *zPath, 
  int nPathOut, 
  char *zPathOut
){
  zPathOut[0] = 0;
  return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);
}
#ifndef SQLITE_OMIT_LOAD_EXTENSION
void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
  return pVfs->xDlOpen(pVfs, zPath);
}
void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){