From b3f69f16da5cfdb613529165436f088a643a8b19 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 22 Nov 2026 14:04:45 +0100 Subject: [PATCH] Fix NULL user ID hint dereference in sign passphrase callback --- gnupg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnupg.c b/gnupg.c index 51176b1..0ccac2b 100644 --- a/gnupg.c +++ b/gnupg.c @@ -672,6 +672,10 @@ gpgme_error_t passphrase_cb( GNUPG_ERR("Incorrent passphrase"); return 1; } + if (uid_hint == NULL) { + GNUPG_ERR("No user ID hint"); + return 1; + } for (idx=0; idx < 16 && uid_hint[idx] != '\0'; idx++) { uid[idx] = uid_hint[idx]; }