diff options
author | Jim Meyering <jim@meyering.net> | 1997-09-15 12:34:25 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-09-15 12:34:25 +0000 |
commit | 45853bf653708146f01b8d1c60dd90e545962667 (patch) | |
tree | e70d52c29912855cf4f7e462e1d2f4960a10e320 | |
parent | ee6273585403d0488a7ac84f387611ed3b4c9dc7 (diff) | |
download | coreutils-45853bf653708146f01b8d1c60dd90e545962667.tar.xz |
Use memcpy, not stpncpy. This fixes a UMR.
-rw-r--r-- | src/rm.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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) |