Skip to content

Commit a9af700

Browse files
committed
LibPDF: Be stricter about flex size in type 1 fonts
This should never fail in practice, so hopefully no behavior change.
1 parent 6840f8a commit a9af700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Libraries/LibPDF/Fonts/Type1FontProgram.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ ErrorOr<Type1FontProgram::Glyph> Type1FontProgram::parse_glyph(ReadonlyBytes con
493493
state.postscript_stack[state.postscript_sp++] = x;
494494

495495
if (state.flex_index != 14)
496-
break;
496+
return AK::Error::from_string_literal("Unexpected stack size for othersubr 0");
497497

498498
auto& flex = state.flex_sequence;
499499

0 commit comments

Comments
 (0)