]> granicus.if.org Git - mutt/commitdiff
Fix a segmentation fault in hook parsing. From Bob Bell.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 5 Sep 2000 22:12:45 +0000 (22:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 5 Sep 2000 22:12:45 +0000 (22:12 +0000)
hook.c

diff --git a/hook.c b/hook.c
index d6e454295a6a608ee07e1b2ec6ce5a2db5fef8a7..d895c466105479b151364efa5c61438eab6a59e3 100644 (file)
--- 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);