[poppler] poppler/XRef.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 15 15:35:12 UTC 2023


 poppler/XRef.cc |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 22c68e52fd8f761cd1b3f38253fcae00055b02f9
Author: Ilaï Deutel <idtl at google.com>
Date:   Thu Jul 13 14:03:56 2023 -0400

    Fix use-of-uninitialized-value in XRef
    
    Attribute `keyLength` of `XRef` is not initialized on object creation, and is subsequently used, for instance in `XRef::fetch` ([poppler/XRef.cc:1214](https://gitlab.freedesktop.org/poppler/poppler/-/blob/e0148dbc9a0189d1ee982a1b3e763930e086b919/poppler/XRef.cc#L1214)). This was flagged by running `MemorySanitizer`.

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 89f7390f..7480958c 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -257,6 +257,7 @@ XRef::XRef() : objStrs { 5 }
     strOwner = false;
     xrefReconstructed = false;
     encAlgorithm = cryptNone;
+    keyLength = 0;
 }
 
 XRef::XRef(const Object *trailerDictA) : XRef {}


More information about the poppler mailing list