diff options
author | Ingo Klöcker <[email protected]> | 2021-12-22 11:16:34 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2021-12-22 14:25:42 +0000 |
commit | 300776f39165da068757864e9cb3029f06f3be5b (patch) | |
tree | 5087ddde99cfd74a61291145e84c2ec9fc1e093b /lang/cpp/src/importresult.cpp | |
parent | core: Detect bad passphrase error on certificate import (diff) | |
download | gpgme-300776f39165da068757864e9cb3029f06f3be5b.tar.gz gpgme-300776f39165da068757864e9cb3029f06f3be5b.zip |
cpp: Check fpr of import status for NULL
* lang/cpp/src/importresult.cpp (GpgME::ImportResult::Private): Check
fpr for NULL.
--
GnuPG-bug-id: 5713
Diffstat (limited to 'lang/cpp/src/importresult.cpp')
-rw-r--r-- | lang/cpp/src/importresult.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lang/cpp/src/importresult.cpp b/lang/cpp/src/importresult.cpp index 20a3174b..803c34db 100644 --- a/lang/cpp/src/importresult.cpp +++ b/lang/cpp/src/importresult.cpp @@ -48,7 +48,9 @@ public: // We just need to handle the pointers in the structs: for (gpgme_import_status_t is = r.imports ; is ; is = is->next) { gpgme_import_status_t copy = new _gpgme_import_status(*is); - copy->fpr = strdup(is->fpr); + if (is->fpr) { + copy->fpr = strdup(is->fpr); + } copy->next = nullptr; imports.push_back(copy); } |