Bug 700315 - Segfault in GS 9.26 with certain PDFs with -dLastPage=1
Summary: Segfault in GS 9.26 with certain PDFs with -dLastPage=1
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Ken Sharp
QA Contact: Bug traffic
URL:
Keywords:
: 700313 700314 700350 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-03 16:49 UTC by Bheeshmar Redheendran
Modified: 2018-12-08 14:08 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Output of run with -dDEBUG (49.23 KB, text/plain)
2018-12-03 16:50 UTC, Bheeshmar Redheendran
Details
PDF example that causes the segfault (233.25 KB, application/pdf)
2018-12-03 16:51 UTC, Bheeshmar Redheendran
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bheeshmar Redheendran 2018-12-03 16:49:41 UTC
We use ImageMagick to extract a the first page of a PDF as a thumbnail and recently started getting exceptions with some PDFs. Traced it to the call that ImageMagick was making:

gs  -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dLastPage=1 -sOutputFile=1.png -f Bloomfire-Security_and_Redundancy.pdf

When this is run with GS version 9.25, the thumbnail is extracted with no error.
When this is run with GS version 9.26, I see "Segmentation fault: 11"

I've attached a file that causes there error. Observed on both OSX and Ubuntu Linux.
Comment 1 Bheeshmar Redheendran 2018-12-03 16:50:51 UTC
Created attachment 16470 [details]
Output of run with -dDEBUG
Comment 2 Bheeshmar Redheendran 2018-12-03 16:51:24 UTC
Created attachment 16471 [details]
PDF example that causes the segfault
Comment 3 Ken Sharp 2018-12-04 00:47:14 UTC

*** This bug has been marked as a duplicate of bug 699815 ***
Comment 4 Ken Sharp 2018-12-04 21:05:41 UTC
*** Bug 700314 has been marked as a duplicate of this bug. ***
Comment 5 Ken Sharp 2018-12-04 21:10:10 UTC
*** Bug 700313 has been marked as a duplicate of this bug. ***
Comment 6 Ken Sharp 2018-12-04 21:32:36 UTC
Fixed in commit fae21f1668d2b44b18b84cf0923a1d5f3008a696
Comment 7 Ken Sharp 2018-12-08 12:38:00 UTC
*** Bug 700350 has been marked as a duplicate of this bug. ***
Comment 8 Ken Sharp 2018-12-08 14:08:24 UTC
*** Bug 700350 has been marked as a duplicate of this bug. ***