diff options
| author | Richard M. Stallman | 1993-12-24 02:17:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-12-24 02:17:52 +0000 |
| commit | 3f628ebde46e9f587145dfb7e7b55ffccfa7df09 (patch) | |
| tree | c6628ff06ee23a1d9bd3269359822410353e9f97 /lib-src | |
| parent | 7694a0c4c2fb1c0f0c63998ea47500bee0f42be5 (diff) | |
| download | emacs-3f628ebde46e9f587145dfb7e7b55ffccfa7df09.tar.gz emacs-3f628ebde46e9f587145dfb7e7b55ffccfa7df09.zip | |
(main): When making tempname, cast result of xmalloc.
Include room for EXXXXXX in the size.
Don't use result of strcpy.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/movemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index a391a9dd783..60b10b27b43 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -185,7 +185,8 @@ main (argc, argv) | |||
| 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--; |