[Poppler-bugs] [Bug 44659] New: Segmentation fault of pdfunite on certain files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 10 20:10:36 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=44659

             Bug #: 44659
           Summary: Segmentation fault of pdfunite on certain files
    Classification: Unclassified
           Product: poppler
           Version: unspecified
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: asolokha at gmx.com


Created attachment 55403
  --> https://bugs.freedesktop.org/attachment.cgi?id=55403
gdb backtrace

There are some files that make pdfunite to segfault (backtrace attached). The
crash is reproducible w/ either pdfunite 0.18.2 or built from today's git
(master).

The following patch fixes the crash:

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index df9cc06..b82869b 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -119,7 +119,7 @@ extern XpdfPluginVecTable xpdfPluginVecTable;

 //------------------------------------------------------------------------

-GlobalParams *globalParams = NULL;
+GlobalParams *globalParams = new GlobalParams(0);

 //------------------------------------------------------------------------
 // DisplayFontParam

(indeed, it introduces a memory leak).

Steps to reproduce:
% cp a.pdf b.pdf
% pdfunite a.pdf b.pdf c.pdf

The bug is reproducible w/
http://web.archive.org/web/20090122061701/http://www.free-culture.cc/freeculture.pdf
or other files generated w/ certain versions of Acrobat Distiller (Acrobat
Distiller 5.0.5 for Macintosh or Acrobat Distiller 8.1.0 (Windows), for
example).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list