diff options
author | saturneric <[email protected]> | 2025-04-12 11:47:01 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-12 11:47:01 +0000 |
commit | b6e7eee4dfefb70505e29bd22d535ae1fcbed10c (patch) | |
tree | c7dc83074304d8df1232290905cc7757b6cb630a /src/core/model/GpgUID.cpp | |
parent | refactor: GpgKey and GpgSubKey (diff) | |
download | GpgFrontend-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.cpp | 3 |
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; |