Diffusion GnuPG c13e459ffeff

gpgparsemail: Die on parse error (not abort).

Authored by gniibe on Jun 6 2019, 2:32 AM.

Description

gpgparsemail: Die on parse error (not abort).

* tools/gpgparsemail.c (parse_message): Don't use ERRNO.
* tools/rfc822parse.c (transition_to_body): Return -1.
(transition_to_header, insert_header): Likewise.
  • GnuPG-bug-id: T1977
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

werner added a subscriber: werner.Jun 6 2019, 7:47 AM
werner added inline comments.
/tools/gpgparsemail.c
657

Other code also assumes that ERRNO is set on failure (mime-parser.c). Thus it would be good to use gpg_err_set_errno (EWHATEVER) fefore the calling functions returns -1 instead of log_assert.