summaryrefslogtreecommitdiffstats
path: root/buffy.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-11-10 10:36:27 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-11-10 10:36:27 +0000
commit43df3616d4c7c01385476ca19b1cf705cad0c0a0 (patch)
tree62a77f9d5435180add32355ed4e514398f252f03 /buffy.c
parent96b9307f2919c96d046f1417d8ca01b35dcae399 (diff)
Skip empty mailbox parameters. This fixes a segmentation fault
noted by Marco d'Itri.
Diffstat (limited to 'buffy.c')
-rw-r--r--buffy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/buffy.c b/buffy.c
index e1097fa2..0a2ccce9 100644
--- a/buffy.c
+++ b/buffy.c
@@ -169,6 +169,10 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
mutt_extract_token (path, s, 0);
strfcpy (buf, path->data, sizeof (buf));
mutt_expand_path (buf, sizeof (buf));
+
+ /* Skip empty tokens. */
+ if(!*buf) continue;
+
/* simple check to avoid duplicates */
for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
{