]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - libiberty/dyn-string.c
Remove support for the beos file format
[thirdparty/binutils-gdb.git] / libiberty / dyn-string.c
index 9de50eda0e863d1f345a2994ea4327e0fc6d2f17..ecd8c06998461ccf29d4df62b17c481d2c52b758 100644 (file)
@@ -1,5 +1,5 @@
 /* An abstract string datatype.
-   Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1998-2024 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GNU CC.
@@ -277,7 +277,7 @@ dyn_string_insert_cstr (dyn_string_t dest, int pos, const char *src)
   for (i = dest->length; i >= pos; --i)
     dest->s[i + length] = dest->s[i];
   /* Splice in the new stuff.  */
-  strncpy (dest->s + pos, src, length);
+  memcpy (dest->s + pos, src, length);
   /* Compute the new length.  */
   dest->length += length;
   return 1;
@@ -336,7 +336,7 @@ dyn_string_append_cstr (dyn_string_t dest, const char *s)
   return 1;
 }
 
-/* Appends C to the end of DEST.  Returns 1 on success.  On failiure,
+/* Appends C to the end of DEST.  Returns 1 on success.  On failure,
    if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0.  */
 
 int