mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(main): When making tempname, cast result of xmalloc.
Include room for EXXXXXX in the size. Don't use result of strcpy.
This commit is contained in:
parent
7694a0c4c2
commit
3f628ebde4
1 changed files with 2 additions and 1 deletions
|
|
@ -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--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue