diff options
author | Andre Heinecke <[email protected]> | 2016-10-10 15:36:41 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-10-10 15:36:41 +0000 |
commit | 34e9dfee81958160f6604849b63369ae4de67417 (patch) | |
tree | a1318748495266a42c2bdcf94f3bf1677b0d036a /lang/cpp/src/verificationresult.cpp | |
parent | qt: Add simple verify test (diff) | |
download | gpgme-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.
Diffstat (limited to 'lang/cpp/src/verificationresult.cpp')
-rw-r--r-- | lang/cpp/src/verificationresult.cpp | 2 |
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>()); |