Skip to content

Commit 91bef05

Browse files
committed
JsonParser too
1 parent 00e3b13 commit 91bef05

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/main/org/hjson/JsonParser.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ private JsonValue readValue() throws IOException{
8484

8585

8686
private JsonValue readValue(int depth) throws IOException {
87-
if(current==123) {
88-
++depth;
89-
}
9087
/* The following has been refrenced for the resolution of the vulnerability:
9188
https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b
9289
*/
@@ -103,9 +100,9 @@ private JsonValue readValue(int depth) throws IOException {
103100
case '"':
104101
return readString();
105102
case '[':
106-
return readArray(depth);
103+
return readArray(depth + 1);
107104
case '{':
108-
return readObject(depth);
105+
return readObject(depth + 1);
109106
case '-':
110107
case '0':
111108
case '1':

0 commit comments

Comments
 (0)