diff options
author | 2005-04-27 09:33:20 +0000 | |
---|---|---|
committer | 2005-04-27 09:33:20 +0000 | |
commit | 2aa20281bbe3ac4a0d6997e8f27c22068d27ab7f (patch) | |
tree | 5206957ef9a2c7327f6647030e3e3c57381388b5 /gnu/lib/libiberty/src | |
parent | spacing (diff) | |
download | wireguard-openbsd-2aa20281bbe3ac4a0d6997e8f27c22068d27ab7f.tar.xz wireguard-openbsd-2aa20281bbe3ac4a0d6997e8f27c22068d27ab7f.zip |
strcpy->strlcpy, needed by libstdc++ actually.
Diffstat (limited to 'gnu/lib/libiberty/src')
-rw-r--r-- | gnu/lib/libiberty/src/dyn-string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/lib/libiberty/src/dyn-string.c b/gnu/lib/libiberty/src/dyn-string.c index 1da76c2110d..be182e2c630 100644 --- a/gnu/lib/libiberty/src/dyn-string.c +++ b/gnu/lib/libiberty/src/dyn-string.c @@ -209,7 +209,7 @@ dyn_string_copy (dest, src) if (dyn_string_resize (dest, src->length) == NULL) return 0; /* Copy DEST into SRC. */ - strcpy (dest->s, src->s); + strlcpy (dest->s, src->s, dest->allocated); /* Update the size of DEST. */ dest->length = src->length; return 1; @@ -229,7 +229,7 @@ dyn_string_copy_cstr (dest, src) if (dyn_string_resize (dest, length) == NULL) return 0; /* Copy DEST into SRC. */ - strcpy (dest->s, src); + strlcpy (dest->s, src, dest->allocated); /* Update the size of DEST. */ dest->length = length; return 1; @@ -349,7 +349,7 @@ dyn_string_append (dest, s) { if (dyn_string_resize (dest, dest->length + s->length) == 0) return 0; - strcpy (dest->s + dest->length, s->s); + strlcpy (dest->s + dest->length, s->s, dest->allocated - dest->length); dest->length += s->length; return 1; } @@ -369,7 +369,7 @@ dyn_string_append_cstr (dest, s) one for the null at the end. */ if (dyn_string_resize (dest, dest->length + len) == NULL) return 0; - strcpy (dest->s + dest->length, s); + strlcpy (dest->s + dest->length, s, dest->allocated - dest->length); dest->length += len; return 1; } |