[poppler] poppler/FileSpec.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 6 14:21:26 UTC 2018


 poppler/FileSpec.cc |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6912e06d9ab19ba28991b5cab3319d61d856bd6d
Author: Adam Reichold <adam.reichold at t-online.de>
Date:   Tue Nov 6 09:00:02 2018 +0100

    Check for stream before calling stream methods when saving an embedded file.
    
    Closes #659

diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
index 7479c2d2..d5543041 100644
--- a/poppler/FileSpec.cc
+++ b/poppler/FileSpec.cc
@@ -93,6 +93,9 @@ bool EmbFile::save(const char *path) {
 bool EmbFile::save2(FILE *f) {
   int c;
 
+  if (unlikely(!m_objStr.isStream()))
+    return false;
+
   m_objStr.streamReset();
   while ((c = m_objStr.streamGetChar()) != EOF) {
     fputc(c, f);


More information about the poppler mailing list