We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 612dafc commit dfa651eCopy full SHA for dfa651e
1 file changed
JSONTokener.java
@@ -278,7 +278,11 @@ public String nextString(char quote) throws JSONException {
278
sb.append('\r');
279
break;
280
case 'u':
281
- sb.append((char)Integer.parseInt(this.next(4), 16));
+ try {
282
+ sb.append((char)Integer.parseInt(this.next(4), 16));
283
+ } catch (NumberFormatException e) {
284
+ throw this.syntaxError("Illegal escape.");
285
+ }
286
287
case '"':
288
case '\'':
0 commit comments