aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-10-17 20:41:46 +0000
committerdrh <drh@noemail.net>2011-10-17 20:41:46 +0000
commit57db4a750951933a45fc17e185e313526017ae9c (patch)
tree04633d22514935b5dafadd3ec9acb98480e86841 /src
parent2458a2e742b9cd1c732485656e96364e05130316 (diff)
downloadsqlite-57db4a750951933a45fc17e185e313526017ae9c.tar.gz
sqlite-57db4a750951933a45fc17e185e313526017ae9c.zip
Avoid 32-bit integer overflow when evaluating the exponent of a floating point
value during ascii to binary conversion. FossilOrigin-Name: 4becc47eb4d48686faca4f61e93e5f379b227fcc
Diffstat (limited to 'src')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index f4a6c7d00..3356417e0 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;
}