From cf0c46c27bca3de031b0ce546c11153430ebd9df Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 30 Mar 2006 20:54:00 +0000 Subject: 2006-03-30 Martin Hunt * string.c (_stp_string_cat_cstr): Use memcpy() instead of strncpy(). --- runtime/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/string.c') diff --git a/runtime/string.c b/runtime/string.c index 2243aa53..f3e88ea3 100644 --- a/runtime/string.c +++ b/runtime/string.c @@ -134,13 +134,13 @@ void _stp_string_cat_cstr (String str1, const char *str2) num = STP_PRINT_BUF_LEN; } buf = &_stp_pbuf[cpu][STP_PRINT_BUF_START] + _stp_pbuf_len[cpu]; - strncpy (buf, str2, num + 1); + memcpy (buf, str2, num + 1); _stp_pbuf_len[cpu] += num; } else { int size = STP_STRING_SIZE - str1->len - 1; if (num > size) num = size; - strncpy (str1->buf + str1->len, str2, num); + memcpy (str1->buf + str1->len, str2, num); str1->len += num; str1->buf[str1->len] = 0; } -- cgit