mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Ensure that the label for a JSON object really is a string and not an array
or object that just happens to end with a string. dbsqfuzz 32f62ed8676d0a153dbe756aeae3202d3670fe50. FossilOrigin-Name: c335737c2889722ea05b732a5efff8a2f31140c18ca038c41e05c2a26e0db5bd
This commit is contained in:
@@ -1085,6 +1085,7 @@ json_parse_restart:
|
||||
return -1;
|
||||
}
|
||||
for(j=i+1;;j++){
|
||||
u32 nNode = pParse->nNode;
|
||||
x = jsonParseValue(pParse, j);
|
||||
if( x<=0 ){
|
||||
if( x==(-2) ){
|
||||
@@ -1111,7 +1112,7 @@ json_parse_restart:
|
||||
}
|
||||
}
|
||||
if( pParse->oom ) return -1;
|
||||
pNode = &pParse->aNode[pParse->nNode-1];
|
||||
pNode = &pParse->aNode[nNode];
|
||||
if( pNode->eType!=JSON_STRING ){
|
||||
pParse->iErr = j;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user