[poppler] glib/poppler-attachment.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sat Apr 25 10:12:40 PDT 2009
glib/poppler-attachment.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 977a13f1091700bf7e7b31859e0e6632dc323462
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 2e2d12d..f6dbfd2 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 (), (time_t *)&attachment->ctime);
_poppler_convert_pdf_date_to_gtime (emb_file->modDate (), (time_t *)&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