summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-28 13:41:23 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-28 13:41:23 +0800
commitf1f00d16b45129bf45ac8c33729be01ca9169e12 (patch)
treefea967e0b878820d55a32e914d813a8f6e918cdc /mbbsd/mail.c
parent7e6208a021bc404aaeb782669b7c403160a4c8d8 (diff)
downloadpttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar.gz
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar.bz2
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar.lz
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar.xz
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.tar.zst
pttbbs-f1f00d16b45129bf45ac8c33729be01ca9169e12.zip
- mail: fix assert in case some new mail has empty filename.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3874 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 972f37c3..3160d333 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -817,7 +817,8 @@ read_new_mail(void * voidfptr, void *optarg)
char genbuf[4];
arg->idc++;
- if (fptr->filemode)
+ // XXX fptr->filename may be invalid.
+ if (fptr->filemode || !fptr->filename[0])
return 0;
clear();
move(10, 0);