Fix off-by-one error when parsing primitive JSON types "true", "false", and
"null". FossilOrigin-Name: 42c15c1e36b5077646fef99028cf12e587a45023
This commit is contained in:
parent
e9c37f32e5
commit
b2cd10eaa9
@ -666,17 +666,17 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
|
||||
return j+1;
|
||||
}else if( c=='n'
|
||||
&& strncmp(pParse->zJson+i,"null",4)==0
|
||||
&& !isalnum(pParse->zJson[i+5]) ){
|
||||
&& !isalnum(pParse->zJson[i+4]) ){
|
||||
jsonParseAddNode(pParse, JSON_NULL, 0, 0);
|
||||
return i+4;
|
||||
}else if( c=='t'
|
||||
&& strncmp(pParse->zJson+i,"true",4)==0
|
||||
&& !isalnum(pParse->zJson[i+5]) ){
|
||||
&& !isalnum(pParse->zJson[i+4]) ){
|
||||
jsonParseAddNode(pParse, JSON_TRUE, 0, 0);
|
||||
return i+4;
|
||||
}else if( c=='f'
|
||||
&& strncmp(pParse->zJson+i,"false",5)==0
|
||||
&& !isalnum(pParse->zJson[i+6]) ){
|
||||
&& !isalnum(pParse->zJson[i+5]) ){
|
||||
jsonParseAddNode(pParse, JSON_FALSE, 0, 0);
|
||||
return i+5;
|
||||
}else if( c=='-' || (c>='0' && c<='9') ){
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sa\sprototype\sJSON\sparser.
|
||||
D 2015-08-15T21:25:37.000
|
||||
C Fix\soff-by-one\serror\swhen\sparsing\sprimitive\sJSON\stypes\s"true",\s"false",\sand\n"null".
|
||||
D 2015-08-15T21:29:14.831
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 7669f34c487f5b328de6b508f374ee1e56558bb0
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -192,7 +192,7 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
|
||||
F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f
|
||||
F ext/misc/fuzzer.c 4c84635c71c26cfa7c2e5848cf49fe2d2cfcd767
|
||||
F ext/misc/ieee754.c b0362167289170627659e84173f5d2e8fee8566e
|
||||
F ext/misc/json.c f4fa58cb8c6a7e13ae9a357e8c5783f43c60f595
|
||||
F ext/misc/json.c 4f2ea491dd4f24d7a6be299af71093e6008b2f75
|
||||
F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
|
||||
F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63
|
||||
F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc
|
||||
@ -1374,7 +1374,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P e3596ac7b1dd5bde3f9cae5781a6806d8d9f7166
|
||||
R 45c6bd1bef56b998d07e7b3125f794b3
|
||||
P 789ba487000aa73621a41d115ad5de455ea8ea31
|
||||
R 11d4a720790fbd16eb396e67acd5adf6
|
||||
U drh
|
||||
Z e2e8ec51bb6080feb16e3eda35039c7d
|
||||
Z 4f36882f0704e134b10a4112fe9bc870
|
||||
|
@ -1 +1 @@
|
||||
789ba487000aa73621a41d115ad5de455ea8ea31
|
||||
42c15c1e36b5077646fef99028cf12e587a45023
|
Loading…
Reference in New Issue
Block a user