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.
- Fixes-commit: 8066f8a3470f9d2f3682a28641a7b09eca29a105
- GnuPG-bug-id: T6174