mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +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.
--
Fixes-commit: 8066f8a347
which caused the assertion failure on error.
The second fix avoids repeated error message about non-compliant keys.
GnuPG-bug-id: 6174
This commit is contained in:
parent
f88cb12f8e
commit
aa0c942521
3 changed files with 9 additions and 6 deletions
|
@ -753,6 +753,9 @@ do_plaintext( IOBUF out, int ctb, PKT_plaintext *pt )
|
|||
if (pt->buf)
|
||||
{
|
||||
nbytes = iobuf_copy (out, pt->buf);
|
||||
if (nbytes == (size_t)(-1)
|
||||
&& (iobuf_error (out) || iobuf_error (pt->buf)))
|
||||
return iobuf_error (out)? iobuf_error (out):iobuf_error (pt->buf);
|
||||
if(ctb_new_format_p (ctb) && !pt->len)
|
||||
/* Turn off partial body length mode. */
|
||||
iobuf_set_partial_body_length_mode (out, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue