From 34e9dfee81958160f6604849b63369ae4de67417 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 10 Oct 2016 17:36:41 +0200 Subject: 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. --- lang/cpp/src/verificationresult.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lang/cpp/src/verificationresult.cpp') 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()); -- cgit v1.2.3