Commit 3f628ebd authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(main): When making tempname, cast result of xmalloc.

Include room for EXXXXXX in the size.
Don't use result of strcpy.
parent 7694a0c4
......@@ -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--;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment