Bug 705849 - New PDF interpreter errors out with PDFFitPage
Summary: New PDF interpreter errors out with PDFFitPage
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 9.56.1
Hardware: PC Linux
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 11:04 UTC by M.J.G.
Modified: 2022-09-06 16:02 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
test case (1.33 KB, application/pdf)
2022-09-06 11:04 UTC, M.J.G.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M.J.G. 2022-09-06 11:04:54 UTC
Created attachment 23118 [details]
test case

Over at Fedora, we got a bug report against 9.56.1: https://bugzilla.redhat.com/show_bug.cgi?id=2123391

It boils down to:

"gs -dPDFFitPage test.pdf" gives "Error: /typecheck in --runpdf--" whereas both "gs -dNEWPDF=false -dPDFFitPage test.pdf" (with scaling) and "gs test.pdf" (without scaling) work.

I have reproduced this with ghostpdl-10.0.0rc1 as well as the current gs10.0.0 branch head (ea03f1a59), both with Fedora type so builds (using system libaries) as well as stock static builds (using all bundled libraries).

Error messages differ: rc1 gives "Error: /undefined in --runpdf--" instead.
Comment 1 Ken Sharp 2022-09-06 15:13:21 UTC
This is specific to having a square MediaBox, obviously something we ommitted in testing, in which case values are left on the operand stack.

Fixed in this commit 7c33727834bcf59a79402c46fdcde25291805d35
Comment 2 M.J.G. 2022-09-06 15:50:48 UTC
What an incredibly fast fix! Thanks a lot.

Works fine when backported to 9.56.1, too.
Comment 3 Ken Sharp 2022-09-06 16:02:52 UTC
(In reply to M.J.G. from comment #2)
> What an incredibly fast fix! Thanks a lot.

Would have been quicker if we hadn't had a slew of reports from the OSS fuzzer this morning :-(

 
> Works fine when backported to 9.56.1, too.

Yes I should have said, sorry. It was a fairly obvious oversight. It should be in the next 10.00.0 release candidate, which will be tomorrow unless something else important crops up before then. I asked the build maintainer to hold off until tomorrow so I could get this one in.