Skip to content

Commit 00e3b13

Browse files
committed
general fix
1 parent a16cb6a commit 00e3b13

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/main/org/hjson/HjsonParser.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ private JsonValue readValue() throws IOException, ParseException {
117117
}
118118

119119
private JsonValue readValue(int depth) throws IOException, ParseException {
120-
if(current==123) {
121-
++depth;
122-
}
123120
/* The following has been refrenced for the resolution of the vulnerability:
124121
https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b
125122
*/
@@ -129,8 +126,8 @@ private JsonValue readValue(int depth) throws IOException, ParseException {
129126
switch(current) {
130127
case '\'':
131128
case '"': return readString();
132-
case '[': return readArray(depth);
133-
case '{': return readObject(false, depth);
129+
case '[': return readArray(depth + 1);
130+
case '{': return readObject(false, depth + 1);
134131
default: return readTfnns();
135132
}
136133

0 commit comments

Comments
 (0)