diff options
-rw-r--r-- | runtime/ChangeLog | 7 | ||||
-rw-r--r-- | runtime/print.c | 2 | ||||
-rw-r--r-- | runtime/string.c | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index cd28bb7f..2bbf949e 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,10 @@ +2005-06-02 Martin Hunt <hunt@redhat.com> + + * string.c (_stp_string_cat_cstr): Be sure result is + always terminated. + + * print.c (_stp_vprintf): Fix typo. + 2005-05-31 Martin Hunt <hunt@redhat.com> * map.c (_stp_map_print): Now takes a format string instead of a name. diff --git a/runtime/print.c b/runtime/print.c index e9847ef8..e7e97d27 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -102,7 +102,7 @@ void _stp_print_flush (void) * You probably want _stp_printf(). */ -#define _stp_vprintf(fmt,args) _stp_vsprintf(stdout,fmt,args) +#define _stp_vprintf(fmt,args) _stp_vsprintf(_stp_stdout,fmt,args) /** Write a C string into the print buffer. * Copies a string into a print buffer. diff --git a/runtime/string.c b/runtime/string.c index 1f0edbb8..4d5a9c83 100644 --- a/runtime/string.c +++ b/runtime/string.c @@ -159,6 +159,7 @@ void _stp_string_cat_cstr (String str1, const char *str2) num = size; strncpy (str1->buf + str1->len, str2, num); str1->len += num; + str1->buf[str1->len] = 0; } } |