is an array of chars rather than a pointer that used to get set to a small
calloc'd space that would get clobbered if you changed to a longer name.
SCCS-vsn: usr.bin/mail/main.c 2.7
* Startup -- interface with user.
*/
* Startup -- interface with user.
*/
-static char *SccsId = "@(#)main.c 2.6 %G%";
+static char *SccsId = "@(#)main.c 2.7 %G%";
ef = (char *) calloc(1, strlen(ename) + 1);
strcpy(ef, ename);
}
ef = (char *) calloc(1, strlen(ename) + 1);
strcpy(ef, ename);
}
- editfile = mailname = ef;
+ editfile = ef;
+ strcpy(mailname, ef);
}
if (setfile(mailname, edit) < 0)
exit(1);
}
if (setfile(mailname, edit) < 0)
exit(1);