Skip to content

Commit 90e62b0

Browse files
Bad XML
1 parent 294c16b commit 90e62b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

JSONML.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ of this software and associated documentation files (the "Software"), to deal
3232
* JSONObject, and to covert a JSONArray or JSONObject into an XML text using
3333
* the JsonML transform.
3434
* @author JSON.org
35-
* @version 2011-10-04
35+
* @version 2011-10-05
3636
*/
3737
public class JSONML {
3838

@@ -66,6 +66,9 @@ private static Object parse(
6666
// <? ... ?>
6767

6868
while (true) {
69+
if (!x.more()) {
70+
throw x.syntaxError("Bad XML");
71+
}
6972
token = x.nextContent();
7073
if (token == XML.LT) {
7174
token = x.nextToken();

0 commit comments

Comments
 (0)