Fixed another weird bug caused by the static mailpath being overwritten.
[mmh] / 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