<<< Date Index >>>     <<< Thread Index >>>

mutt/2010: "nospam foo" segfaults if no "spam" command has been used (pending)



>Number:         2010
>Notify-List:    
>Category:       mutt
>Synopsis:       "nospam foo" segfaults if no "spam" command has been used
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 29 17:49:24 +0200 2005
>Originator:     Tamo
>Release:        1.5.9
>Organization:
http://www.momonga-linux.org/
>Environment:
any
>Description:
"nospam foo" causes a segv if you have not
set any "spam". Because the initial value of
SpamList is 0.
>How-To-Repeat:
push ":nospam foobar".
>Fix:
init.c:
 
   /* Being first is a special case. */
   spam = *list;
+  if (!spam)
+    return 0;
   if (spam->rx && !mutt_strcmp(spam->rx->pattern, pat))
   {
     *list = spam->next;


(included in
http://www.momonga-linux.org/~tamo/patch-1.5.9.tamo.comval.7 )
>Add-To-Audit-Trail:

>Unformatted: