Fixed another weird bug caused by the static mailpath being overwritten.
authorJon Steinhart <jon@fourwinds.com>
Tue, 12 Oct 2004 21:14:02 +0000 (21:14 +0000)
committerJon Steinhart <jon@fourwinds.com>
Tue, 12 Oct 2004 21:14:02 +0000 (21:14 +0000)
uip/inc.c

index 02a2cbf..864574b 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -534,6 +534,11 @@ main (int argc, char **argv)
        }
        if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
            adios (NULL, "no mail to incorporate");
+
+       if ((cp = strdup(newmail)) == (char *)0)
+           adios (maildir, "error allocating memory to copy newmail");
+
+       newmail = cp;
     }
 
 #ifdef POP