swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] SEGV on the pdf2swf and a patch to fix


From: Rick - Rikiya Ayukawa
Subject: [Swftools-common] SEGV on the pdf2swf and a patch to fix
Date: Sat, 21 Mar 2009 19:10:09 +0900
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Hi,

I found that a SEGV occurs on the pdf2swf when you input a particular
PDF file with some commandline options.

See below for an example:

  $ ./pdf2swf --version
  pdf2swf - part of swftools 2009-03-15-1014
  You have new mail in /var/spool/mail/root

  $ wget http://www.bls.gov/opub/mlr/1982/06/art2full.pdf
  $ ./pdf2swf -f -s poly2bitmap -p1 art2full.pdf
  NOTICE  Output filename not given. Writing to art2full.swf
  NOTICE  processing PDF page 1 (622x792:0:0) (move:0:0)
  Segmentation fault

I attached a patch to fix this problem.


I use the pdf2swf for the web service named "Hot.Docs".
Thanks for providing such a good tool.

Regards.

--
Rikiya Ayukawa
Ideallink Inc.

Hot.Docs link : http://www.hotdocs.jp/
(Japanese version only)


--- swftools-2009-03-15-1014/lib/pdf/BitmapOutputDev.cc 2009-02-12 
02:17:09.000000000 +0900
+++ swftools-2009-03-15-1014/lib/pdf/BitmapOutputDev.cc 2009-03-20 
18:39:34.000000000 +0900
@@ -1412,7 +1412,10 @@
    
        /* calculate the bbox of this character */
        int x1 = (int)x, x2 = (int)x+1, y1 = (int)y, y2 = (int)y+1;
-       SplashPath*path = clip0dev->getCurrentFont()->getGlyphPath(code);
+       SplashPath*path = NULL;
+       if(clip0dev->getCurrentFont() != NULL)
+         path = clip0dev->getCurrentFont()->getGlyphPath(code);
+
         if(!path) {
             if(code)
                 msg("<error> couldn't create outline for char %d", code);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]