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 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] != '/')
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