projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee62735
)
Use memcpy, not stpncpy. This fixes a UMR.
author
Jim Meyering
<jim@meyering.net>
Mon, 15 Sep 1997 12:34:25 +0000
(12:34 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 15 Sep 1997 12:34:25 +0000
(12:34 +0000)
src/rm.c
patch
|
blob
|
history
diff --git
a/src/rm.c
b/src/rm.c
index
fcb678f
..
7d35763
100644
(file)
--- a/
src/rm.c
+++ b/
src/rm.c
@@
-133,7
+133,6
@@
char *realloc ();
char *base_name ();
int euidaccess ();
char *stpcpy ();
-char *stpncpy ();
void strip_trailing_slashes ();
char *xmalloc ();
int yesno ();
@@
-600,7
+599,7
@@
remove_cwd_entries (void)
error (1, 0, _("Memory exhausted"));
}
p = xmalloc (NLENGTH (dp) + 1);
-
stpncpy (p, (dp)->d_name, NLENGTH (dp)
);
+
memcpy (p, (dp)->d_name, NLENGTH (dp) + 1
);
fail = hash_insert_item (ht, p, &old_item);
assert (old_item == NULL);
if (fail)