mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-12-01 21:18:50 +00:00
Fix use of uninitialized input buffer in decrypt and decryptverify
This commit is contained in:
parent
dd7b83b02d
commit
07ac28927e
1 changed files with 2 additions and 0 deletions
2
gnupg.c
2
gnupg.c
|
|
@ -1647,6 +1647,7 @@ PHP_FUNCTION(gnupg_decrypt)
|
|||
|
||||
if (!PHP_GNUPG_DO(gpgme_data_new_from_mem(&in, enctxt, enctxt_len, 0))) {
|
||||
GNUPG_ERR("could not create in-data buffer");
|
||||
return;
|
||||
}
|
||||
if ((intern->err = gpgme_data_new(&out)) != GPG_ERR_NO_ERROR) {
|
||||
GNUPG_ERR("could not create out-data buffer");
|
||||
|
|
@ -1716,6 +1717,7 @@ PHP_FUNCTION(gnupg_decryptverify)
|
|||
|
||||
if (!PHP_GNUPG_DO(gpgme_data_new_from_mem(&in, enctxt, enctxt_len, 0))) {
|
||||
GNUPG_ERR("could not create in-data buffer");
|
||||
return;
|
||||
}
|
||||
if (!PHP_GNUPG_DO(gpgme_data_new(&out))) {
|
||||
GNUPG_ERR("could not create out-data buffer");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue