8264923: PNGImageWriter.write_zTXt throws Exception with a typo

Reviewed-by: aivanov, jdv, azvegint, kizune
This commit is contained in:
Aleksey Shipilev 2021-04-09 06:24:48 +00:00
parent 1c6b1134d0
commit 051c117bf0

View File

@ -824,7 +824,7 @@ public final class PNGImageWriter extends ImageWriter {
ChunkStream cs = new ChunkStream(PNGImageReader.zTXt_TYPE, stream);
String keyword = keywordIter.next();
if (keyword.length() > 79) {
throw new IIOException("tEXt keyword is longer than 79");
throw new IIOException("zTXt keyword is longer than 79");
}
cs.writeBytes(keyword);
cs.writeByte(0);