1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpgparsemail: Die on parse error, printing errno thing.

* tools/gpgparsemail.c (parse_message): Revert the change.
* tools/rfc822parse.c (transition_to_body): Set ERRNO.
(transition_to_header, insert_header): Likewise.

--

In the comment of rfc822parse_* functions, it explicitly explained
setting ERRNO on error.  For parser errors, it may not have
appropriate ERRNO, in such a case, use ENOENT.

Fixes-commit: c13e459ffe
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2019-06-07 13:28:07 +09:00
parent 72fe8d652f
commit 1e9d61fb95
2 changed files with 17 additions and 5 deletions

View file

@ -654,7 +654,7 @@ parse_message (FILE *fp)
if (rfc822parse_insert (msg, line, length))
die ("parser failed");
die ("parser failed: %s", strerror (errno));
if (info.hashing)
{