Skip to content

Commit f4b3bae

Browse files
committed
Add test for ParseException use of tokenImage
1 parent 4832dc5 commit f4b3bae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

java/ql/test/query-tests/security/CWE-532/TokenSequenceParserTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,13 @@ void test(String password) {
1515
}
1616

1717
}
18+
19+
class ParseExceptionTest extends Exception {
20+
String[] tokenImage;
21+
22+
void test() {
23+
Logger logger = null;
24+
25+
logger.info("When parsing found this: " + tokenImage[0]); // Safe
26+
}
27+
}

0 commit comments

Comments
 (0)