SQLite

Check-in [ce36b6d133]
Login

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

Overview
Comment:Change a NEVER macro into a NO_TEST comment, as the conditional is reachable, but only when compiling for Windows 32-bit.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ce36b6d1331edba5a921fef32553e2470a79bdb1f62d2cfd81190691c83d5b06
User & Date: drh 2020-05-21 20:38:39.168
Context
2020-05-22
17:46
Version 3.32.0 (check-in: 5998789c9c user: drh tags: trunk, release, version-3.32.0)
2020-05-21
20:38
Change a NEVER macro into a NO_TEST comment, as the conditional is reachable, but only when compiling for Windows 32-bit. (check-in: ce36b6d133 user: drh tags: trunk)
19:13
Avoid another potential OOB read in sqlite3expert.c. (check-in: 0ccea80092 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/memdb.c.
609
610
611
612
613
614
615
616
617
618



619
620
621
622
623
** This routine is called when the extension is loaded.
** Register the new VFS.
*/
int sqlite3MemdbInit(void){
  sqlite3_vfs *pLower = sqlite3_vfs_find(0);
  int sz = pLower->szOsFile;
  memdb_vfs.pAppData = pLower;
  /* In all known configurations of SQLite, the size of a default
  ** sqlite3_file is greater than the size of a memdb sqlite3_file.
  ** Should that ever change, remove the following NEVER() */



  if( NEVER(sz<sizeof(MemFile)) ) sz = sizeof(MemFile);
  memdb_vfs.szOsFile = sz;
  return sqlite3_vfs_register(&memdb_vfs, 0);
}
#endif /* SQLITE_ENABLE_DESERIALIZE */







<
<
|
>
>
>
|




609
610
611
612
613
614
615


616
617
618
619
620
621
622
623
624
** This routine is called when the extension is loaded.
** Register the new VFS.
*/
int sqlite3MemdbInit(void){
  sqlite3_vfs *pLower = sqlite3_vfs_find(0);
  int sz = pLower->szOsFile;
  memdb_vfs.pAppData = pLower;


  /* The following conditional can only be true when compiled for
  ** Windows x86 and SQLITE_MAX_MMAP_SIZE=0.  We always leave
  ** it in, to be safe, but it is marked as NO_TEST since there
  ** is no way to reach it under most builds. */
  if( sz<sizeof(MemFile) ) sz = sizeof(MemFile); /*NO_TEST*/
  memdb_vfs.szOsFile = sz;
  return sqlite3_vfs_register(&memdb_vfs, 0);
}
#endif /* SQLITE_ENABLE_DESERIALIZE */