tFail when unable to parse headers - scribo - Email-based phlog generator
HTML git clone git://git.z3bra.org/scribo.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 1c682cbba573efade479d76b4282aa02e15dff73
DIR parent c861c67c0042328d3fd4e4ef9163bfdaf9c6a47c
HTML Author: Willy Goiffon <dev@z3bra.org>
Date: Sun, 6 Sep 2020 19:20:14 +0200
Fail when unable to parse headers
Diffstat:
M mailog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/mailog.c b/mailog.c
t@@ -21,7 +21,8 @@ main(int argc, char *argv[])
if (argc > 1)
fp = fopen(argv[1], "r");
- rfc5322_parse(fp, &head);
+ if (rfc5322_parse(fp, &head) < 0)
+ return -1;
SLIST_FOREACH(p, &head, entries)
printf("%s: %s\n", p->field, p->body);