[PATCH] SEGV in parse_alias() debug code
Edge case, this one. I get a segv parsing my aliases file with -d3 or
-d4, becase I have a group alias.
alias foo Foo: foo@foo, foo@bar;
Patch attached.
--
-D. dgc@xxxxxxxxxxxx NSIT University of Chicago
CVSROOT =
Using: /opt/bin/cvs diff init.c
Index: init.c
===================================================================
RCS file: /home/roessler/cvs/mutt/init.c,v
retrieving revision 3.41
diff -u -r3.41 init.c
--- init.c 17 Sep 2005 20:46:10 -0000 3.41
+++ init.c 19 Sep 2005 19:33:38 -0000
@@ -941,7 +1159,8 @@
if (debuglevel >= 2)
{
ADDRESS *a;
- for (a = tmp->addr; a; a = a->next)
+ /* A group is terminated with an emoty address, so check a->mailbox */
+ for (a = tmp->addr; a && a->mailbox; a = a->next)
{
if (!a->group)
dprint (2, (debugfile, "parse_alias: %s\n",