LibPDF/CFF: Add dbgln() when failing encoding bounds check

This commit is contained in:
Nico Weber 2024-02-19 21:44:30 -05:00 committed by Sam Atkins
parent 4705d38fa7
commit 05a7482118
Notes: sideshowbarker 2024-07-18 05:37:06 +09:00

View File

@ -280,6 +280,7 @@ PDFErrorOr<NonnullRefPtr<CFF>> CFF::create(ReadonlyBytes const& cff_bytes, RefPt
continue;
}
if (i - 1 >= encoding_codes.size() || i - 1 >= charset_names.size()) {
dbgln("CFF: No encoding for glyph {} onwards, encoding_codes size {} charset_names size {}", i, encoding_codes.size(), charset_names.size());
break;
}
auto code = encoding_codes[i - 1];