1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix an instance of signed arithmetic overflow and an one bit-shift overflow.

Mark six other signed arithmetic overflow locations that need fixing.

FossilOrigin-Name: 04abab71ecd52f6070b9f84781a3df3d6dba7722
This commit is contained in:
drh
2011-03-05 13:54:15 +00:00
parent 92e4feb74c
commit cfd654bf2a
12 changed files with 33 additions and 27 deletions

View File

@@ -1964,7 +1964,7 @@ static void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){
c = sqlite3Atoi64(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
if( c==0 || (c==2 && negFlag) ){
char *zV;
if( negFlag ){ value = -value; }
if( negFlag ){ value = -value; } /* CLANG */
zV = dup8bytes(v, (char*)&value);
sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64);
}else{