Fix NULL user ID hint dereference in sign passphrase callback

This commit is contained in:
Jakub Zelenka 2026-11-22 14:04:45 +01:00
commit b3f69f16da
No known key found for this signature in database
GPG key ID: 1C0779DC5C0A9DE4

View file

@ -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];
}