From 8f54d0a4670439d227e46f140c30e227e9840c06 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 29 Feb 2008 03:08:55 +0000 Subject: - mail: fail-safe filename check to avoid segv crash git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3954 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mail.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mbbsd/mail.c b/mbbsd/mail.c index a5f09ce3..a7e7504e 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -654,6 +654,9 @@ multi_send(char *title) static int multi_reply(int ent, fileheader_t * fhdr, const char *direct) { + if (!fhdr || !fhdr->filename[0]) + return DONOTHING; + if (!(fhdr->filemode & FILE_MULTI)) return mail_reply(ent, fhdr, direct); @@ -1210,6 +1213,9 @@ mail_reply(int ent, fileheader_t * fhdr, const char *direct) char genbuf[512]; int oent = ent; + if (!fhdr || !fhdr->filename[0]) + return DONOTHING; + stand_title("¦^ «H"); /* §PÂ_¬O boards ©Î mail */ -- cgit v1.2.3