Skip to content

Commit 249e551

Browse files
committed
Change name and add comment
Signed-off-by: Arthur Chan <[email protected]>
1 parent eeed68e commit 249e551

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sigstore-java/src/test/java/dev/sigstore/encryption/KeysTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,11 @@ void parseTufPublicKey_rsa()
186186
}
187187

188188
@Test
189-
void parsePublicKeyBad()
189+
void parsePublicKey_failOnNullSection()
190190
throws IOException, NoSuchAlgorithmException, NoSuchProviderException {
191+
// This unit test is used to test the fix for a bug discovered by oss-fuzz
192+
// The bug happens when a malformed byte array is passed to the method
193+
// https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=57247
191194
byte[] byteArray = "-----BEGIN A-----\nBBBBB-----END A".getBytes(StandardCharsets.UTF_8);
192195
Assertions.assertThrows(InvalidKeySpecException.class, () -> Keys.parsePublicKey(byteArray));
193196
}

0 commit comments

Comments
 (0)