1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add assert to check that the memory block for the previous directory value was allocated via sqlite3_malloc or related function.

FossilOrigin-Name: 1246f15b146ebf6518fb8f5c92a1ebc9495cd9dc
This commit is contained in:
mistachkin
2012-08-22 00:18:27 +00:00
parent 6154068851
commit 484dbef5d9
3 changed files with 8 additions and 10 deletions

View File

@@ -1355,6 +1355,7 @@ int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
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] ){