summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog3
-rw-r--r--runtime/string.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 59de5332..04e02ce7 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,5 +1,8 @@
2006-04-10 Martin Hunt <hunt@redhat.com>
+ * string.c (_stp_string_cat_cstr): No need to copy
+ terminating 0.
+
* vsprintf.c (_stp_snprintf): New function.
* stat-common.c (_stp_stat_print_histogram): Write a
diff --git a/runtime/string.c b/runtime/string.c
index efb4d595..fa8e2dda 100644
--- a/runtime/string.c
+++ b/runtime/string.c
@@ -134,7 +134,7 @@ 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];
- memcpy (buf, str2, num + 1);
+ memcpy (buf, str2, num);
_stp_pbuf_len[cpu] += num;
} else {
int size = STP_STRING_SIZE - str1->len - 1;