mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Fix assertion failure due to errors in encrypt_filter.
* common/iobuf.c (iobuf_copy): Use log_assert. Explicitly cast error return value. * g10/build-packet.c (do_plaintext): Check for iobuf_copy error. * g10/encrypt.c (encrypt_filter): Immediately set header_okay. -- The second fix avoids repeated error message about non-compliant keys. Updates-commit:a51067a21f
Ported-from:aa0c942521
GnuPG-bug-id: 6174
This commit is contained in:
parent
a51067a21f
commit
46f9b0071f
3 changed files with 9 additions and 5 deletions
|
@ -1060,6 +1060,8 @@ encrypt_filter (void *opaque, int control,
|
|||
{
|
||||
if ( !efx->header_okay )
|
||||
{
|
||||
efx->header_okay = 1;
|
||||
|
||||
efx->cfx.dek = create_dek_with_warnings (efx->pk_list);
|
||||
|
||||
rc = check_encryption_compliance (efx->cfx.dek, efx->pk_list);
|
||||
|
@ -1092,7 +1094,6 @@ encrypt_filter (void *opaque, int control,
|
|||
/**/ : cipher_filter_cfb,
|
||||
&efx->cfx);
|
||||
|
||||
efx->header_okay = 1;
|
||||
}
|
||||
rc = iobuf_write (a, buf, size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue