Fix possible StringIndexOutOfBoundsException when extracting XMP.

This commit is contained in:
langfr
2026-05-28 14:49:39 +01:00
parent a2bcd02b29
commit a8d5ee8822
2 changed files with 5 additions and 1 deletions

View File

@@ -131,8 +131,10 @@ public class PDFValidator extends Validator {
String xmp;
if (zi.getXMP() == null) {
xmp = null;
} else {
} else if (zi.getXMP().indexOf('<') > 0) {
xmp = zi.getXMP().substring(zi.getXMP().indexOf('<'));
} else {
xmp = zi.getXMP();
}
final Document docXMP;