Home GnuPG
Diffusion GnuPG c13e459ffeff

gpgparsemail: Die on parse error (not abort).

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

Provenance
gniibeAuthored on Jun 6 2019, 2:32 AM
Parents
rG9bf650db022b: sm: Print a better diagnostic for encryption certificate selection.
Branches
Unknown
Tags
Unknown
Tasks
T1977: abort in gpgparsemail

Event Timeline

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.