Skip to content

Commit e66b00e

Browse files
committed
Merge branch 'master' of https://github.com/alibaba/fastjson
2 parents 70ed7e5 + 78e2651 commit e66b00e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/main/java/com/alibaba/fastjson/parser/JSONLexerBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2539,7 +2539,7 @@ public final boolean isBlankInput() {
25392539

25402540
public final void skipWhitespace() {
25412541
for (;;) {
2542-
if (whitespaceFlags[ch]) {
2542+
if (ch < whitespaceFlags.length && whitespaceFlags[ch]) {
25432543
next();
25442544
continue;
25452545
} else {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.alibaba.json.bvt;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.alibaba.fastjson.JSONException;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.fail;
8+
9+
public class Bug89 {
10+
@Test
11+
public void testBug89() {
12+
try {
13+
String s = "{\"a\":з」∠)_,\"}";
14+
JSON.parseObject(s);
15+
fail("Expect JSONException");
16+
} catch (JSONException e) {
17+
// good
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)