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

Avoid 32-bit integer overflow when evaluating the exponent of a floating point

value during ascii to binary conversion.

FossilOrigin-Name: 4becc47eb4d48686faca4f61e93e5f379b227fcc
This commit is contained in:
drh
2011-10-17 20:41:46 +00:00
parent 2458a2e742
commit 57db4a7509
4 changed files with 55 additions and 9 deletions

View File

@@ -331,7 +331,7 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
}
/* copy digits to exponent */
while( z<zEnd && sqlite3Isdigit(*z) ){
e = e*10 + (*z - '0');
e = e<10000 ? (e*10 + (*z - '0')) : 10000;
z+=incr;
eValid = 1;
}