mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-04 13:21:34 +00:00
Fix GH-46: gnupg_decrypt() segfault when password callback uid hint not supplied (#51)
This commit is contained in:
parent
473cfc78f7
commit
312655c7ce
5 changed files with 179 additions and 3 deletions
4
gnupg.c
4
gnupg.c
|
|
@ -732,6 +732,10 @@ gpgme_error_t passphrase_decrypt_cb (
|
|||
GNUPG_ERR("Incorrent passphrase");
|
||||
return 1;
|
||||
}
|
||||
if (uid_hint == NULL) {
|
||||
GNUPG_ERR("No user ID hint");
|
||||
return 1;
|
||||
}
|
||||
for (idx=0; idx < 16; idx++) {
|
||||
uid[idx] = uid_hint[idx];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue