aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeblob.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-05-04 13:15:55 +0000
committerdrh <drh@noemail.net>2007-05-04 13:15:55 +0000
commit5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f (patch)
tree95a6f87a3340c4292d0b03201c2512f567fc2cfd /src/vdbeblob.c
parent92d4d7a92e1a1e465a0d5fd3e9a42e90ddcbda4b (diff)
downloadsqlite-5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f.tar.gz
sqlite-5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f.zip
Eliminate all uses of sprintf() and strcpy(). These were not being
misused. But getting rid of them removes a library dependency. And it avoids warnings from the OpenBSD compiler. Ticket #2336. (CVS 3916) FossilOrigin-Name: ba4845b32bdf38e623c4f7246e6e327715bbba4b
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r--src/vdbeblob.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c
index 9fbdca71a..22e6d2da1 100644
--- a/src/vdbeblob.c
+++ b/src/vdbeblob.c
@@ -10,7 +10,7 @@
**
*************************************************************************
**
-** $Id: vdbeblob.c,v 1.6 2007/05/04 12:05:56 danielk1977 Exp $
+** $Id: vdbeblob.c,v 1.7 2007/05/04 13:15:57 drh Exp $
*/
#include "sqliteInt.h"
@@ -83,8 +83,9 @@ int sqlite3_blob_open(
Vdbe *v = 0;
int rc = SQLITE_OK;
- char zErr[128] = {0};
+ char zErr[128];
+ zErr[0] = 0;
do {
Parse sParse;
Table *pTab;
@@ -131,7 +132,8 @@ int sqlite3_blob_open(
int j;
for(j=0; j<pIdx->nColumn; j++){
if( pIdx->aiColumn[j]==iCol ){
- strcpy(zErr, "cannot open indexed column for writing");
+ sqlite3_snprintf(sizeof(zErr), zErr,
+ "cannot open indexed column for writing");
rc = SQLITE_ERROR;
sqlite3SafetyOff(db);
goto blob_open_out;