LibPDF: Remove the subroutine length limit for PS1 font programs

A limit of 1024 subroutines seemed like a sensible choice, but some
fonts actually do exceed it. We will now only assert that the specified
amount is positive.
This commit is contained in:
Julian Offenhäuser 2023-03-24 22:17:56 +01:00 committed by Andrew Kaster
parent 4ec01669fc
commit 2b3a41be74

View file

@ -108,7 +108,7 @@ PDFErrorOr<Vector<ByteBuffer>> PS1FontProgram::parse_subroutines(Reader& reader)
return error("Expected array length"); return error("Expected array length");
auto length = TRY(parse_int(reader)); auto length = TRY(parse_int(reader));
VERIFY(length <= 1024); VERIFY(length > 0);
Vector<ByteBuffer> array; Vector<ByteBuffer> array;
TRY(array.try_resize(length)); TRY(array.try_resize(length));