]> granicus.if.org Git - neomutt/commitdiff
Fix a possible segmentation fault in mutt_expand_path. Noted by
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 26 Jun 2000 23:09:22 +0000 (23:09 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 26 Jun 2000 23:09:22 +0000 (23:09 +0000)
Andreas M. Kirchwitz.

muttlib.c

index 04fa7fe2b271183cefa72a6157d691530c0e35ac..e0bfc42766a300b5e1d47bc00d0e43f7ce776870 100644 (file)
--- 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;