Home GnuPG
Diffusion GnuPG aa0c942521d8

gpg: Fix assertion failure due to errors in encrypt_filter.

Description

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.

which caused the assertion failure on error.

The second fix avoids repeated error message about non-compliant keys.

Details