[poppler] A minor improvement

王璐 coolwanglu at gmail.com
Mon Sep 24 01:36:58 PDT 2012


Hello

I guess it's too trivial to worth filing a bug

At line 2027
if(!strObj.isStream())
 goto err1;

Then strObj.streamClose() right after err1 will crash.

- Lu

////////////////////////////////////////
//// patch

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 93b078a..cbbad1e 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -2148,7 +2148,8 @@ void PSOutputDev::setupEmbeddedType1Font(Ref *id,
GooString *psName) {
   writePS("%%EndResource\n");

  err1:
-  strObj.streamClose();
+  if (strObj.isStream())
+      strObj.streamClose();
   strObj.free();
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120924/4b5d67d2/attachment.html>


More information about the poppler mailing list