mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
LibPDF: Tolerate 0-sized Subrs in PS1 font subprograms
This regressed in 2b3a41be74
in #18031.
Fixes a crash rendering page 2 and onward of
https://pyx-project.org/presentation_dantemv35_en.pdf
This commit is contained in:
parent
b73ae80d8b
commit
ee74bc2538
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ PDFErrorOr<Vector<ByteBuffer>> PS1FontProgram::parse_subroutines(Reader& reader)
|
|||
return error("Expected array length");
|
||||
|
||||
auto length = TRY(parse_int(reader));
|
||||
VERIFY(length > 0);
|
||||
VERIFY(length >= 0);
|
||||
|
||||
Vector<ByteBuffer> array;
|
||||
TRY(array.try_resize(length));
|
||||
|
|
Loading…
Reference in a new issue