From: Richard M. Stallman Date: Fri, 24 Dec 1993 02:17:52 +0000 (+0000) Subject: (main): When making tempname, cast result of xmalloc. X-Git-Tag: emacs-19.34~10533 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f628ebde46e9f587145dfb7e7b55ffccfa7df09;p=emacs.git (main): When making tempname, cast result of xmalloc. Include room for EXXXXXX in the size. Don't use result of strcpy. --- diff --git a/lib-src/movemail.c b/lib-src/movemail.c index a391a9dd783..60b10b27b43 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -185,7 +185,8 @@ main (argc, argv) to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */ lockname = concat (inname, ".lock", ""); - tempname = strcpy (xmalloc (strlen (inname)+1), inname); + tempname = (char *) xmalloc (strlen (inname) + strlen ("EXXXXXX") + 1); + strcpy (tempname, inname); p = tempname + strlen (tempname); while (p != tempname && p[-1] != '/') p--;