Mercurial > emacs
changeset 5318:60fa1ee0c98c
(main): When making tempname, cast result of xmalloc.
Include room for EXXXXXX in the size.
Don't use result of strcpy.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 24 Dec 1993 02:17:52 +0000 |
parents | dfe798027eac |
children | 55ef6a6dc4c2 |
files | lib-src/movemail.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/movemail.c Fri Dec 24 02:16:49 1993 +0000 +++ b/lib-src/movemail.c Fri Dec 24 02:17:52 1993 +0000 @@ -185,7 +185,8 @@ 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--;