Mercurial > emacs
comparison lib-src/movemail.c @ 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 | 623be452ebb8 |
children | d7408b99b88f |
comparison
equal
deleted
inserted
replaced
5317:dfe798027eac | 5318:60fa1ee0c98c |
---|---|
183 and recompile movemail. If the s- file for your system | 183 and recompile movemail. If the s- file for your system |
184 should define MAIL_USE_FLOCK but does not, send a bug report | 184 should define MAIL_USE_FLOCK but does not, send a bug report |
185 to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */ | 185 to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */ |
186 | 186 |
187 lockname = concat (inname, ".lock", ""); | 187 lockname = concat (inname, ".lock", ""); |
188 tempname = strcpy (xmalloc (strlen (inname)+1), inname); | 188 tempname = (char *) xmalloc (strlen (inname) + strlen ("EXXXXXX") + 1); |
189 strcpy (tempname, inname); | |
189 p = tempname + strlen (tempname); | 190 p = tempname + strlen (tempname); |
190 while (p != tempname && p[-1] != '/') | 191 while (p != tempname && p[-1] != '/') |
191 p--; | 192 p--; |
192 *p = 0; | 193 *p = 0; |
193 strcpy (p, "EXXXXXX"); | 194 strcpy (p, "EXXXXXX"); |