mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +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:
@@ -475,9 +475,9 @@ do_atoi_calc:
|
||||
zStart = zNum;
|
||||
while( zNum<zEnd && zNum[0]=='0' ){ zNum+=incr; } /* Skip leading zeros. */
|
||||
for(i=0; &zNum[i]<zEnd && (c=zNum[i])>='0' && c<='9'; i+=incr){
|
||||
v = v*10 + c - '0';
|
||||
v = v*10 + c - '0'; /* CLANG */
|
||||
}
|
||||
*pNum = neg ? -v : v;
|
||||
*pNum = neg ? -v : v; /* CLANG */
|
||||
testcase( i==18 );
|
||||
testcase( i==19 );
|
||||
testcase( i==20 );
|
||||
|
||||
Reference in New Issue
Block a user