]> 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 804821425b54c93ab448ea4b84a29d2fe28a7779..ecd8c06998461ccf29d4df62b17c481d2c52b758 100644 (file)
@@ -1,5 +1,5 @@
 /* An abstract string datatype.
-   Copyright (C) 1998-2017 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;