/ Check-in [1246f15b]
Login

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

Overview
Comment:Add assert to check that the memory block for the previous directory value was allocated via sqlite3_malloc or related function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win32SetDir
Files: files | file ages | folders
SHA1:1246f15b146ebf6518fb8f5c92a1ebc9495cd9dc
User & Date: mistachkin 2012-08-22 00:18:27
Context
2012-08-23
22:45
Merge changes for the new sqlite3_win32_set_directory API to trunk. check-in: 20f184f2 user: mistachkin tags: trunk
2012-08-22
00:18
Add assert to check that the memory block for the previous directory value was allocated via sqlite3_malloc or related function. Closed-Leaf check-in: 1246f15b user: mistachkin tags: win32SetDir
2012-08-21
23:33
Added sqlite3_win32_set_directory API to assist in portability to WinRT. check-in: 600de08d user: mistachkin tags: win32SetDir
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

1351
1352
1353
1354
1355
1356
1357

1358
1359
1360
1361
1362
1363
1364
    ppDirectory = &sqlite3_data_directory;
  }else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_temp_directory;
  }
  assert( !ppDirectory || type==SQLITE_WIN32_DATA_DIRECTORY_TYPE
          || type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE
  );

  if( ppDirectory ){
    char *zValueUtf8 = 0;
    if( zValue && zValue[0] ){
      zValueUtf8 = unicodeToUtf8(zValue);
      if ( zValueUtf8==0 ){
        return SQLITE_NOMEM;
      }







>







1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
    ppDirectory = &sqlite3_data_directory;
  }else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_temp_directory;
  }
  assert( !ppDirectory || type==SQLITE_WIN32_DATA_DIRECTORY_TYPE
          || type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE
  );
  assert( !ppDirectory || sqlite3MemdebugHasType(*ppDirectory, MEMTYPE_HEAP) );
  if( ppDirectory ){
    char *zValueUtf8 = 0;
    if( zValue && zValue[0] ){
      zValueUtf8 = unicodeToUtf8(zValue);
      if ( zValueUtf8==0 ){
        return SQLITE_NOMEM;
      }