From: pmf Date: Sat, 28 Jul 2007 05:05:01 +0000 (+0000) Subject: fix off-by-one error in append_ll() X-Git-Tag: v0.12.20~935 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f6e3111c8215f9afcb21d9cbe2d0bbb7b7dbba3b;p=lttv.git fix off-by-one error in append_ll() git-svn-id: http://ltt.polymtl.ca/svn@2554 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/facility.c b/ltt/branches/poly/ltt/facility.c index 65c86893..e0c296a5 100644 --- a/ltt/branches/poly/ltt/facility.c +++ b/ltt/branches/poly/ltt/facility.c @@ -234,8 +234,8 @@ void append_ll (char **fmt, char **fmt_type){ int num; - //new_fmt = malloc(strlen(*fmt)*sizeof(char)+2);//the +2 corresponds the the "ll"; - new_fmt = g_new(gchar, strlen(*fmt)+2); + //the +2 corresponds the the "ll"; the +1 is the \0 + new_fmt = g_new(gchar, strlen(*fmt)+2+1); num = *fmt_type - *fmt;