[poppler] poppler/Link.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 27 08:03:25 UTC 2020


 poppler/Link.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e9279fecf6f53c60cc85f30dc38198d5675bbe9e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue May 26 23:48:17 2020 +0200

    Make Link that are "Unknown destination type" be "no ok"
    
    otherwise we have uninitialized memory when asking for getKind()
    
    I mean we have it anyway, but it is understood that if isOk is false any
    further question you make is allowed to misbehave

diff --git a/poppler/Link.cc b/poppler/Link.cc
index 38f4f3dd..0528db1a 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -401,10 +401,10 @@ LinkDest::LinkDest(const Array *a) {
   // unknown link kind
   } else {
     error(errSyntaxWarning, -1, "Unknown annotation destination type");
+    return;
   }
 
   ok = true;
-  return;
 }
 
 LinkDest::LinkDest(const LinkDest *dest) {


More information about the poppler mailing list