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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user