[poppler] poppler/PDFDoc.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Sep 26 10:27:20 PDT 2009


 poppler/PDFDoc.cc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ed4a6f1cfc7ccd2717d939841c092347c3307547
Author: Kovid Goyal <kovid at kovidgoyal.net>
Date:   Sat Sep 26 19:26:19 2009 +0200

    Do not crash when saving files that come from a stream without name
    
    Bug 24090

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 8d85230..4279b33 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -19,6 +19,7 @@
 // Copyright (C) 2008 Pino Toscano <pino at kde.org>
 // Copyright (C) 2008 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2009 Eric Toombs <ewtoombs at uwaterloo.ca>
+// Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -817,7 +818,10 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
   char buffer[256];
   sprintf(buffer, "%i", (int)time(NULL));
   message.append(buffer);
-  message.append(fileName);
+  if (fileName)
+    message.append(fileName);
+  else
+    message.append("streamwithoutfilename.pdf");
   // file size
   unsigned int fileSize = 0;
   int c;


More information about the poppler mailing list