mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Avoid passing NULL pointers to memcmp() or memcpy(), even when the
"number-of-bytes" argument is passed 0. FossilOrigin-Name: 56ff72ab44288296efc99a608f7edc4346366a50
This commit is contained in:
@@ -2739,7 +2739,9 @@ int sqlite3ParseUri(
|
||||
}else{
|
||||
zFile = sqlite3_malloc64(nUri+2);
|
||||
if( !zFile ) return SQLITE_NOMEM_BKPT;
|
||||
memcpy(zFile, zUri, nUri);
|
||||
if( nUri ){
|
||||
memcpy(zFile, zUri, nUri);
|
||||
}
|
||||
zFile[nUri] = '\0';
|
||||
zFile[nUri+1] = '\0';
|
||||
flags &= ~SQLITE_OPEN_URI;
|
||||
|
Reference in New Issue
Block a user