1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Avoid a segfault in sqlite3_bind_parameter_index when there are

unnamed parameters.  Ticket #918. (CVS 1977)

FossilOrigin-Name: 49f25ddf8382d588e00bf927e2acae93e332e4d4
This commit is contained in:
drh
2004-09-24 12:48:12 +00:00
parent 670404626d
commit 971a7c87bc
4 changed files with 51 additions and 10 deletions

View File

@@ -595,7 +595,8 @@ int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
}
createVarMap(p);
for(i=0; i<p->nVar; i++){
if( strcmp(p->azVar[i],zName)==0 ){
const char *z = p->azVar[i];
if( z && strcmp(z,zName)==0 ){
return i+1;
}
}