aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgUID.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-12 11:47:01 +0000
committersaturneric <[email protected]>2025-04-12 11:47:01 +0000
commitb6e7eee4dfefb70505e29bd22d535ae1fcbed10c (patch)
treec7dc83074304d8df1232290905cc7757b6cb630a /src/core/model/GpgUID.cpp
parentrefactor: GpgKey and GpgSubKey (diff)
downloadGpgFrontend-b6e7eee4dfefb70505e29bd22d535ae1fcbed10c.tar.gz
GpgFrontend-b6e7eee4dfefb70505e29bd22d535ae1fcbed10c.zip
fix: avoid accessing invalid pointers of structs related to gpgme_key
Diffstat (limited to 'src/core/model/GpgUID.cpp')
-rw-r--r--src/core/model/GpgUID.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/model/GpgUID.cpp b/src/core/model/GpgUID.cpp
index cd4be820..cfc2784f 100644
--- a/src/core/model/GpgUID.cpp
+++ b/src/core/model/GpgUID.cpp
@@ -32,7 +32,8 @@ namespace GpgFrontend {
GpgUID::GpgUID() = default;
-GpgUID::GpgUID(gpgme_user_id_t uid) : uid_ref_(uid) {}
+GpgUID::GpgUID(QSharedPointer<struct _gpgme_key> key_ref, gpgme_user_id_t uid)
+ : key_ref_(std::move(key_ref)), uid_ref_(uid) {}
GpgUID::GpgUID(const GpgUID &) = default;