diff options
author | drh <drh@noemail.net> | 2011-03-05 13:54:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-03-05 13:54:15 +0000 |
commit | cfd654bf2a3a2f546a3a4507ca196be97f2a37a1 (patch) | |
tree | 97c569e5ed3727106fe0c647e43177fdb305f15a /src/func.c | |
parent | 92e4feb74c888c323d5960861b12d260e774ea45 (diff) | |
download | sqlite-cfd654bf2a3a2f546a3a4507ca196be97f2a37a1.tar.gz sqlite-cfd654bf2a3a2f546a3a4507ca196be97f2a37a1.zip |
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
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c index 19c6d2251..2f21ac0e3 100644 --- a/src/func.c +++ b/src/func.c @@ -1240,7 +1240,7 @@ static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){ i64 v = sqlite3_value_int64(argv[0]); p->rSum += v; if( (p->approx|p->overflow)==0 ){ - i64 iNewSum = p->iSum + v; + i64 iNewSum = p->iSum + v; /* CLANG */ int s1 = (int)(p->iSum >> (sizeof(i64)*8-1)); int s2 = (int)(v >> (sizeof(i64)*8-1)); int s3 = (int)(iNewSum >> (sizeof(i64)*8-1)); |