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

Return SQLITE_MISUSE when passing a NULL pointer into sqlite3_bind routines.

Ticket #1219. (CVS 2497)

FossilOrigin-Name: 12c32f139bae3cb7ca520451bfc15f9f7d94833d
This commit is contained in:
drh
2005-06-06 17:54:55 +00:00
parent ba0232a0df
commit 473d179d8a
5 changed files with 22 additions and 13 deletions

View File

@@ -501,7 +501,7 @@ const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
static int vdbeUnbind(Vdbe *p, int i){
Mem *pVar;
if( p==0 || p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
sqlite3Error(p->db, SQLITE_MISUSE, 0);
if( p ) sqlite3Error(p->db, SQLITE_MISUSE, 0);
return SQLITE_MISUSE;
}
if( i<1 || i>p->nVar ){