1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

More off-by-one errors in the new JSON parsing.

FossilOrigin-Name: dbc99662087b63c9ed5b398535a6091fc2c5e507907dd1fcb7ad0b6ab3f17144
This commit is contained in:
drh
2023-04-02 20:46:24 +00:00
parent 26cc3a1387
commit c406ecc662
3 changed files with 9 additions and 9 deletions

View File

@@ -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;
}