aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgUID.h
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.h
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 '')
-rw-r--r--src/core/model/GpgUID.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/model/GpgUID.h b/src/core/model/GpgUID.h
index d8ac47f2..49ddd4c4 100644
--- a/src/core/model/GpgUID.h
+++ b/src/core/model/GpgUID.h
@@ -109,7 +109,8 @@ class GPGFRONTEND_CORE_EXPORT GpgUID {
*
* @param uid
*/
- explicit GpgUID(gpgme_user_id_t uid);
+ explicit GpgUID(QSharedPointer<struct _gpgme_key> key_ref,
+ gpgme_user_id_t uid);
/**
* @brief
@@ -125,6 +126,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUID {
auto operator=(const GpgUID &) -> GpgUID &;
private:
+ QSharedPointer<struct _gpgme_key> key_ref_;
gpgme_user_id_t uid_ref_ = nullptr; ///<
};