From: Thomas Roessler Date: Tue, 5 Sep 2000 22:12:45 +0000 (+0000) Subject: Fix a segmentation fault in hook parsing. From Bob Bell. X-Git-Tag: mutt-1-3-9-rel~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfb2507a3806fe6b7652f7620aff64505ef2df99;p=mutt Fix a segmentation fault in hook parsing. From Bob Bell. --- diff --git a/hook.c b/hook.c index d6e45429..d895c466 100644 --- a/hook.c +++ b/hook.c @@ -155,9 +155,9 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) { rx = safe_malloc (sizeof (regex_t)); #ifdef M_PGPHOOK - if ((rc = REGCOMP (rx, pattern.data, ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0) + if ((rc = REGCOMP (rx, NONULL(pattern.data), ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0) #else - if ((rc = REGCOMP (rx, pattern.data, (data & M_CHARSETHOOK) ? REG_ICASE : 0)) != 0) + if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & M_CHARSETHOOK) ? REG_ICASE : 0)) != 0) #endif /* HAVE_PGP */ { regerror (rc, rx, err->data, err->dsize);