[poppler] utils/pdfsig.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 20 11:59:04 UTC 2023


 utils/pdfsig.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5ccac116d19c29bc543849a1540921b55c313aa8
Author: Sune Vuorela <sune at vuorela.dk>
Date:   Mon Mar 20 12:07:24 2023 +0100

    pdfsig -dump - allow holes in signature list
    
    It is perfectly possible to have e.g. 4 signature slots and only
    currently a signature in slot first and last slot. pdfsig should be able
    to dump all of them, but it considers a missing signature a stop
    condition. It can just continue and get all of actual ones out.

diff --git a/utils/pdfsig.cc b/utils/pdfsig.cc
index c494de3c..04e04c67 100644
--- a/utils/pdfsig.cc
+++ b/utils/pdfsig.cc
@@ -461,7 +461,10 @@ int main(int argc, char *argv[])
             for (unsigned int i = 0; i < sigCount; i++) {
                 const bool dumpingOk = dumpSignature(i, sigCount, signatures.at(i), fileName->c_str());
                 if (!dumpingOk) {
-                    return 3;
+                    // for now, do nothing. We have logged a message
+                    // to the user before returning false in dumpSignature
+                    // and it is possible to have "holes" in the signatures
+                    continue;
                 }
             }
             return 0;


More information about the poppler mailing list