[poppler] poppler/XRef.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 27 23:45:54 UTC 2020


 poppler/XRef.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit bce14c781b8066ad7e55020e8e2ade5363856854
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Nov 28 00:34:52 2020 +0100

    Fix crash in XRef::removeDocInfo() if Info is not a ref
    
    oss-fuzz/27968

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 3747c6e7..b92c925b 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1250,7 +1250,9 @@ void XRef::removeDocInfo()
 
     trailerDict.dictRemove("Info");
 
-    removeIndirectObject(infoObjRef.getRef());
+    if (likely(infoObjRef.isRef())) {
+        removeIndirectObject(infoObjRef.getRef());
+    }
 }
 
 bool XRef::getStreamEnd(Goffset streamStart, Goffset *streamEnd)


More information about the poppler mailing list