From 49b346f8fede1cb13877314603dcd98cac59bba8 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Tamotsu Date: Fri, 29 Jul 2005 18:05:50 +0000 Subject: [PATCH] "nospam foo" causes a segv if you have not set any "spam", because of a null pointer dereference. --- init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.c b/init.c index 2e50d438..6d9b0a9e 100644 --- a/init.c +++ b/init.c @@ -448,6 +448,8 @@ static int remove_from_spam_list (SPAM_LIST **list, const char *pat) /* Being first is a special case. */ spam = *list; + if (!spam) + return 0; if (spam->rx && !mutt_strcmp(spam->rx->pattern, pat)) { *list = spam->next; -- 2.50.1