From 455f8e578e92e1ca13000cf52661a33c4834c696 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 29 Jan 2007 16:47:28 +0000 Subject: [PATCH] resolve snprintf overflow warning by using sizeof -- Anna Bernathova suse cz git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@979 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index 6abcaf2a..b493cba7 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -724,9 +724,9 @@ int HandleInputLine(int argc, char **argv, FILE* out) for (j = 0; j < col_cnt; j++) { rrd_value_t newval = DNAN; if (enumds == 1) - snprintf(vtag,15,"%s%lu", COL_DATA_TAG, j); + snprintf(vtag,sizeof(vtag),"%s%lu", COL_DATA_TAG, j); else - snprintf(vtag,15,"%s",COL_DATA_TAG); + snprintf(vtag,sizeof(vtag),"%s",COL_DATA_TAG); newval = *ptr; if(isnan(newval)){ -- 2.30.2