[git] GPGME - branch, master, updated. gpgme-1.7.0-51-g1e8c34a

by Andre Heinecke cvs at cvs.gnupg.org
Fri Oct 14 16:29:28 CEST 2016


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  1e8c34a9192956bb2fe96a7a6a76ff59de8d1c0c (commit)
      from  f526d0e22e8b881ccbca66b46a0e1b68bbc4cd6b (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 1e8c34a9192956bb2fe96a7a6a76ff59de8d1c0c
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Oct 14 16:23:57 2016 +0200

    cpp: Fix init of string from null
    
    * lang/cpp/src/key.cpp (UserID::addrSpecFromString): Check return
    value before creating the string.

diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 947405f..235a3c8 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -884,9 +884,12 @@ std::string UserID::addrSpecFromString(const char *userid)
         return std::string();
     }
     char *normalized = gpgme_addrspec_from_uid (userid);
-    std::string ret(normalized);
-    gpgme_free(normalized);
-    return ret;
+    if (normalized) {
+        std::string ret(normalized);
+        gpgme_free(normalized);
+        return ret;
+    }
+    return std::string();
 }
 
 std::string UserID::addrSpec() const

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

Summary of changes:
 lang/cpp/src/key.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list