From: Thomas Roessler Date: Thu, 24 Sep 1998 14:12:50 +0000 (+0000) Subject: Fix a segmentation fault with mismatched backticks. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0196d871a3e3d1b91a11c7ebc4876927786010b;p=neomutt Fix a segmentation fault with mismatched backticks. --- diff --git a/init.c b/init.c index 5b8177c0f..b18f2fc47 100644 --- a/init.c +++ b/init.c @@ -1132,7 +1132,7 @@ int mutt_parse_rc_line (/* const */ char *line, BUFFER *token, BUFFER *err) mutt_extract_token (token, &expn, 0); for (i = 0; Commands[i].name; i++) { - if (!strcmp (token->data, Commands[i].name)) + if (!strcmp (NONULL (token->data), Commands[i].name)) { if (Commands[i].func (token, &expn, Commands[i].data, err) != 0) goto finish; @@ -1141,7 +1141,7 @@ int mutt_parse_rc_line (/* const */ char *line, BUFFER *token, BUFFER *err) } if (!Commands[i].name) { - snprintf (err->data, err->dsize, "%s: unknown command", token->data); + snprintf (err->data, err->dsize, "%s: unknown command", NONULL (token->data)); goto finish; } }