aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr.c2
-rw-r--r--src/insert.c3
-rw-r--r--src/sqliteInt.h1
-rw-r--r--src/vdbemem.c3
4 files changed, 6 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index 9c0ce1f87..d4eb9de62 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1167,7 +1167,7 @@ static int dupedExprStructSize(Expr *p, int flags){
static int dupedExprNodeSize(Expr *p, int flags){
int nByte = dupedExprStructSize(p, flags) & 0xfff;
if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
- nByte += sqlite3Strlen30(p->u.zToken)+1;
+ nByte += sqlite3Strlen30NN(p->u.zToken)+1;
}
return ROUND8(nByte);
}
diff --git a/src/insert.c b/src/insert.c
index d110ab763..7a9413901 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -146,7 +146,8 @@ void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
}while( i>=0 && zColAff[i]==SQLITE_AFF_BLOB );
pTab->zColAff = zColAff;
}
- i = sqlite3Strlen30(zColAff);
+ assert( zColAff!=0 );
+ i = sqlite3Strlen30NN(zColAff);
if( i ){
if( iReg ){
sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 0d6761f47..20db52de3 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -3665,6 +3665,7 @@ int sqlite3IsIdChar(u8);
*/
int sqlite3StrICmp(const char*,const char*);
int sqlite3Strlen30(const char*);
+#define sqlite3Strlen30NN(C) (strlen(C)&0x3fffffff)
char *sqlite3ColumnType(Column*,char*);
#define sqlite3StrNICmp sqlite3_strnicmp
diff --git a/src/vdbemem.c b/src/vdbemem.c
index d204dc8d2..db8feddfb 100644
--- a/src/vdbemem.c
+++ b/src/vdbemem.c
@@ -377,7 +377,8 @@ int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
assert( fg & MEM_Real );
sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->u.r);
}
- pMem->n = sqlite3Strlen30(pMem->z);
+ assert( pMem->z!=0 );
+ pMem->n = sqlite3Strlen30NN(pMem->z);
pMem->enc = SQLITE_UTF8;
pMem->flags |= MEM_Str|MEM_Term;
if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real);