diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-03-25 16:16:29 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-03-25 16:16:29 +0000 |
commit | 4e1ddde370721ed43495a292f6d5d68c8fb1b6a3 (patch) | |
tree | c8576154619ea6214ef3c691cd49a7f94ea91990 /src/tclsqlite.c | |
parent | 52ae7246c660a27c8a7a53a5b054b7660c63e4a0 (diff) | |
download | sqlite-4e1ddde370721ed43495a292f6d5d68c8fb1b6a3.tar.gz sqlite-4e1ddde370721ed43495a292f6d5d68c8fb1b6a3.zip |
Test string values passed to bind_text() and result_text() for a nul-terminator. (CVS 4915)
FossilOrigin-Name: 24c3ebc0c5c53c234516d16dce761d713fb29578
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 0d88727e1..9e49d039e 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -12,7 +12,7 @@ ** A TCL Interface to SQLite. Append this file to sqlite3.c and ** compile the whole thing to build a TCL-enabled version of SQLite. ** -** $Id: tclsqlite.c,v 1.211 2008/03/19 19:01:22 drh Exp $ +** $Id: tclsqlite.c,v 1.212 2008/03/25 16:16:29 danielk1977 Exp $ */ #include "tcl.h" #include <errno.h> @@ -1671,7 +1671,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ sqlite3_bind_int64(pStmt, i, v); }else{ data = (unsigned char *)Tcl_GetStringFromObj(pVar, &n); - sqlite3_bind_text(pStmt, i, (char *)data, n, SQLITE_STATIC); + sqlite3_bind_text(pStmt, i, (char *)data, n+1, SQLITE_STATIC); Tcl_IncrRefCount(pVar); apParm[nParm++] = pVar; } |