[poppler] Branch 'poppler-0.10' - glib/poppler-attachment.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sat Apr 25 10:13:00 PDT 2009


 glib/poppler-attachment.cc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 78479eaa4c0e74c582efce9da8b3b704a62232ab
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sat Apr 25 19:07:01 2009 +0200

    [glib] Only create checksum string for valid checksums

diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc
index b51dbbe..9d3c8f2 100644
--- a/glib/poppler-attachment.cc
+++ b/glib/poppler-attachment.cc
@@ -97,8 +97,9 @@ _poppler_attachment_new (PopplerDocument *document,
   _poppler_convert_pdf_date_to_gtime (emb_file->createDate (), &attachment->ctime);
   _poppler_convert_pdf_date_to_gtime (emb_file->modDate (), &attachment->mtime);
 
-  attachment->checksum = g_string_new_len (emb_file->checksum ()->getCString (),
-					   emb_file->checksum ()->getLength ());
+  if (emb_file->checksum ()->getLength () > 0)
+	  attachment->checksum = g_string_new_len (emb_file->checksum ()->getCString (),
+						   emb_file->checksum ()->getLength ());
   
   emb_file->streamObject().copy(&POPPLER_ATTACHMENT_GET_PRIVATE (attachment)->obj_stream);
 


More information about the poppler mailing list