diff options
author | drh <> | 2023-04-02 20:46:24 +0000 |
---|---|---|
committer | drh <> | 2023-04-02 20:46:24 +0000 |
commit | c406ecc662794445a0805e0803efcbbb662db48f (patch) | |
tree | b3563c04e936c5c74f706f9a5fe8533d26d0b5c1 /src/json.c | |
parent | 26cc3a1387ecc236e826d23a806d7e131d5c4f41 (diff) | |
download | sqlite-c406ecc662794445a0805e0803efcbbb662db48f.tar.gz sqlite-c406ecc662794445a0805e0803efcbbb662db48f.zip |
More off-by-one errors in the new JSON parsing.
FossilOrigin-Name: dbc99662087b63c9ed5b398535a6091fc2c5e507907dd1fcb7ad0b6ab3f17144
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/json.c b/src/json.c index a4ba2e0cf..aa8bf64c8 100644 --- a/src/json.c +++ b/src/json.c @@ -931,11 +931,11 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ && z[i]=='-' && sqlite3StrNICmp(&z[j], "inf",3)==0 ){ - if( !sqlite3Isalnum(z[j+4]) ){ + if( !sqlite3Isalnum(z[j+3]) ){ jsonParseAddNode(pParse, JSON_REAL, 8, "-9.0e999"); return i+4; }else if( (sqlite3StrNICmp(&z[j],"infinity",8)==0 && - !sqlite3Isalnum(z[j+9])) ){ + !sqlite3Isalnum(z[j+8])) ){ jsonParseAddNode(pParse, JSON_REAL, 8, "-9.0e999"); return i+9; } |