diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-12-24 02:17:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-12-24 02:17:52 +0000 |
commit | 996d4673645255ebb9a0a89f0c1bf1875cda7afd (patch) | |
tree | a341f9d8dda405683f3fad6ab296c577281f7b59 /lib-src/movemail.c | |
parent | 66e972d4e0ba4b58fa0c0d8cbae2f714d65bcc8a (diff) | |
download | emacs-996d4673645255ebb9a0a89f0c1bf1875cda7afd.tar.gz |
(main): When making tempname, cast result of xmalloc.
Include room for EXXXXXX in the size.
Don't use result of strcpy.
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r-- | lib-src/movemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
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--; |