From: Thomas Roessler Date: Mon, 26 Jun 2000 23:09:22 +0000 (+0000) Subject: Fix a possible segmentation fault in mutt_expand_path. Noted by X-Git-Tag: mutt-1-3-5-rel~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d54c359c824ead3bf4a0e6ff7bae64cc7c8b10c3;p=mutt Fix a possible segmentation fault in mutt_expand_path. Noted by Andreas M. Kirchwitz. --- diff --git a/muttlib.c b/muttlib.c index 04fa7fe2..e0bfc427 100644 --- a/muttlib.c +++ b/muttlib.c @@ -401,14 +401,14 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) case '>': { - strfcpy (p, Inbox, sizeof (p)); + strfcpy (p, NONULL(Inbox), sizeof (p)); tail = s + 1; } break; case '<': { - strfcpy (p, Outbox, sizeof (p)); + strfcpy (p, NONULL(Outbox), sizeof (p)); tail = s + 1; } break; @@ -417,12 +417,12 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) { if (*(s+1) == '!') { - strfcpy (p, LastFolder, sizeof (p)); + strfcpy (p, NONULL(LastFolder), sizeof (p)); tail = s + 2; } else { - strfcpy (p, Spoolfile, sizeof (p)); + strfcpy (p, NONULL(Spoolfile), sizeof (p)); tail = s + 1; } } @@ -430,7 +430,7 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) case '-': { - strfcpy (p, LastFolder, sizeof (p)); + strfcpy (p, NONULL(LastFolder), sizeof (p)); tail = s + 1; } break;