From 9fe77c4d6778eb6b0ad377abf702e3472cd40564 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 2 Jul 2013 22:03:50 +0300 Subject: Bug fix in profile.c:pp_string for valgrind. --- profile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'profile.c') diff --git a/profile.c b/profile.c index 223a4e33..eae24b1c 100644 --- a/profile.c +++ b/profile.c @@ -1232,6 +1232,8 @@ pp_string(const char *in_str, size_t len, int delim) *obufout++ = '\\'; *obufout++ = delim; } else if (*str == '\0') { + chksize(4); + *obufout++ = '\\'; *obufout++ = '0'; *obufout++ = '0'; @@ -1255,7 +1257,7 @@ pp_string(const char *in_str, size_t len, int delim) obufout += len; } } - chksize(1); + chksize(2); *obufout++ = delim; *obufout = '\0'; return obuf; -- cgit v1.2.3