From 40c52836f9453d17d2eca52e3dbf5e72cd955250 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 12 Oct 2018 11:11:44 +1000 Subject: [PATCH] Fix a couple of bugs --- src/mail_menu.c | 6 ++++++ src/www_msgs.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mail_menu.c b/src/mail_menu.c index 76a2677..97bf810 100644 --- a/src/mail_menu.c +++ b/src/mail_menu.c @@ -477,6 +477,12 @@ char *external_editor(struct user_record *user, char *to, char *from, char *quot sprintf(buffer, "%s/node%d/MSGTMP", conf.bbs_path, mynode); body = file2str(buffer); + if (body == NULL) { + return NULL; + } + + totlen = strlen(body); + if (email == 1) { tagline = conf.default_tagline; } else { diff --git a/src/www_msgs.c b/src/www_msgs.c index 9806fab..25dee31 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -431,7 +431,11 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i stralloc_cats(&page, "\" />\n"); stralloc_cats(&page, "\n"); stralloc_cats(&page, "To :