From 50fa1f6f51db9d0fd630b46b674341a7a149065e Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Fri, 25 Apr 2014 05:33:40 -0500 Subject: [PATCH] Don't cast GTime* to time_t* These are different sizes on 64-bit systems. CID #16825 and 16826. --- glib/poppler-attachment.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc index 874bffb..9475e08 100644 --- a/glib/poppler-attachment.cc +++ b/glib/poppler-attachment.cc @@ -105,6 +105,7 @@ _poppler_attachment_new (FileSpec *emb_file) PopplerAttachment *attachment; PopplerAttachmentPrivate *priv; EmbFile *embFile; + time_t timet; g_assert (emb_file != NULL); @@ -119,10 +120,14 @@ _poppler_attachment_new (FileSpec *emb_file) embFile = emb_file->getEmbeddedFile(); attachment->size = embFile->size (); - if (embFile->createDate ()) - _poppler_convert_pdf_date_to_gtime (embFile->createDate (), (time_t *)&attachment->ctime); - if (embFile->modDate ()) - _poppler_convert_pdf_date_to_gtime (embFile->modDate (), (time_t *)&attachment->mtime); + if (embFile->createDate ()) { + _poppler_convert_pdf_date_to_gtime (embFile->createDate (), &timet); + attachment->ctime = timet; + } + if (embFile->modDate ()) { + _poppler_convert_pdf_date_to_gtime (embFile->modDate (), &timet); + attachment->mtime = timet; + } if (embFile->checksum () && embFile->checksum ()->getLength () > 0) attachment->checksum = g_string_new_len (embFile->checksum ()->getCString (), -- 1.9.2