From: Jim Meyering Date: Mon, 15 Sep 1997 12:34:25 +0000 (+0000) Subject: Use memcpy, not stpncpy. This fixes a UMR. X-Git-Tag: TEXTUTILS-1_22a~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45853bf653708146f01b8d1c60dd90e545962667;p=platform%2Fupstream%2Fcoreutils.git Use memcpy, not stpncpy. This fixes a UMR. --- diff --git a/src/rm.c b/src/rm.c index fcb678f..7d35763 100644 --- 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)