[git] GPGME - branch, master, updated. gpgme-1.11.1-108-ga6e5c8b

by Andre Heinecke cvs at cvs.gnupg.org
Tue Jul 24 08:41:37 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  a6e5c8bf18696007c48c6f362aa355020fe82f21 (commit)
      from  4d1642b11ea64b8009a8720d9b59e89636d691d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a6e5c8bf18696007c48c6f362aa355020fe82f21
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Jul 24 08:40:28 2018 +0200

    cpp: Add safety checks for key update
    
    * lang/cpp/src/key.cpp (Key::update): Check that the key is
    not NULL.
    * lang/cpp/src/verificationresult.cpp (GpgME::Signature::key):
    Check for fingerprint.

diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 61b3eb7..8fc266f 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -347,6 +347,9 @@ const Key &Key::mergeWith(const Key &other)
 
 void Key::update()
 {
+    if (isNull() || !primaryFingerprint()) {
+        return;
+    }
     auto ctx = Context::createForProtocol(protocol());
     if (!ctx) {
         return;
diff --git a/lang/cpp/src/verificationresult.cpp b/lang/cpp/src/verificationresult.cpp
index 2c42d07..fa8237a 100644
--- a/lang/cpp/src/verificationresult.cpp
+++ b/lang/cpp/src/verificationresult.cpp
@@ -406,7 +406,7 @@ GpgME::Key GpgME::Signature::key(bool search, bool update) const
     }
 
     GpgME::Key ret = key();
-    if (ret.isNull() && search) {
+    if (ret.isNull() && search && fingerprint ()) {
         auto ctx = Context::createForProtocol (d->proto);
         if (ctx) {
             ctx->setKeyListMode(KeyListMode::Local |

-----------------------------------------------------------------------

Summary of changes:
 lang/cpp/src/key.cpp                | 3 +++
 lang/cpp/src/verificationresult.cpp | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list