mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Ensure that the main filename and the journal filenames in the pager
object are all correctly double-zero terminated. FossilOrigin-Name: df51ae19c1aa4c26f2dcd427eddc1c9cc24b698e1ab0a948b198a57432e25e1e
This commit is contained in:
19
src/main.c
19
src/main.c
@@ -4187,6 +4187,25 @@ int sqlite3_test_control(int op, ...){
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/*
|
||||
** This routine appears inside assert() statements only.
|
||||
**
|
||||
** Return the number of URI parameters that follow the filename.
|
||||
*/
|
||||
int sqlite3UriCount(const char *z){
|
||||
int n = 0;
|
||||
if( z==0 ) return 0;
|
||||
z += strlen(z)+1;
|
||||
while( z[0] ){
|
||||
z += strlen(z)+1;
|
||||
z += strlen(z)+1;
|
||||
n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
#endif /* SQLITE_DEBUG */
|
||||
|
||||
/*
|
||||
** This is a utility routine, useful to VFS implementations, that checks
|
||||
** to see if a database file was a URI that contained a specific query
|
||||
|
Reference in New Issue
Block a user