aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-10-10 15:36:41 +0000
committerAndre Heinecke <[email protected]>2016-10-10 15:36:41 +0000
commit34e9dfee81958160f6604849b63369ae4de67417 (patch)
treea1318748495266a42c2bdcf94f3bf1677b0d036a
parentqt: Add simple verify test (diff)
downloadgpgme-34e9dfee81958160f6604849b63369ae4de67417.tar.gz
gpgme-34e9dfee81958160f6604849b63369ae4de67417.zip
cpp: Return null key if the signature had no key
* lang/cpp/src/verificationresult.cpp (Private): Add null key to list when there is no key associated with the signature. -- This fixes an out of bounds read when a verification did not have a key.
-rw-r--r--lang/cpp/src/verificationresult.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lang/cpp/src/verificationresult.cpp b/lang/cpp/src/verificationresult.cpp
index be33ca2b..a7b073e6 100644
--- a/lang/cpp/src/verificationresult.cpp
+++ b/lang/cpp/src/verificationresult.cpp
@@ -72,6 +72,8 @@ public:
// copy keys
if (scopy->key) {
keys.push_back(Key(scopy->key, true));
+ } else {
+ keys.push_back(Key());
}
// copy notations:
nota.push_back(std::vector<Nota>());