summaryrefslogtreecommitdiffstats
path: root/runtime/string.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-03-30 20:54:00 +0000
committerhunt <hunt>2006-03-30 20:54:00 +0000
commitcf0c46c27bca3de031b0ce546c11153430ebd9df (patch)
treea61637c0205835bb51933ea1d2fc052940795e1a /runtime/string.c
parentda4e78db674a1ca836a15120a49848308c00270f (diff)
downloadsystemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.tar.gz
systemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.tar.xz
systemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.zip
2006-03-30 Martin Hunt <hunt@redhat.com>
* string.c (_stp_string_cat_cstr): Use memcpy() instead of strncpy().
Diffstat (limited to 'runtime/string.c')
-rw-r--r--runtime/string.c4
1 files changed, 2 insertions, 2 deletions
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;
}