diff options
author | drh <drh@noemail.net> | 2015-10-09 20:40:44 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-10-09 20:40:44 +0000 |
commit | a0882fad7c02f183292998f2a99a72af2327c807 (patch) | |
tree | a6fe43a5824a3704030ecf1fd93e6136e0253660 /ext/misc/json1.c | |
parent | 8deb4b8b172e7156d8ab9ea55135a0af204c0baf (diff) | |
download | sqlite-a0882fad7c02f183292998f2a99a72af2327c807.tar.gz sqlite-a0882fad7c02f183292998f2a99a72af2327c807.zip |
The previous fix to JSON1 was not complete. A few more tweaks are needed
for correct handling of all oversized integers.
FossilOrigin-Name: 4a47f0177851721cdf6c981df962b6e8862372e7
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 2962df25e..fa36419cf 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -28,7 +28,7 @@ SQLITE_EXTENSION_INIT1 #include <assert.h> #include <string.h> -#include <ctype.h> +#include <ctype.h> /* amalgamator: keep */ #include <stdlib.h> #include <stdarg.h> @@ -490,6 +490,7 @@ static void jsonReturn( while( z[0]>='0' && z[0]<='9' ){ unsigned v = *(z++) - '0'; if( i>=LARGEST_INT64/10 ){ + if( i>LARGEST_INT64/10 ) goto int_as_real; if( z[0]>='0' && z[0]<='9' ) goto int_as_real; if( v==9 ) goto int_as_real; if( v==8 ){ |