From 33564dbf0c5db1dc76e096e23c6659356f550016 Mon Sep 17 00:00:00 2001 From: Marek Schimara Date: Wed, 15 Jun 2016 16:19:16 +0200 Subject: [PATCH] src/rrd_graph_helper.c: fix Coverity CID#32401 Buffer not null terminated CWE-170 / https://cwe.mitre.org/data/definitions/170.html --- src/rrd_graph_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index d58bc938..0415af79 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -935,7 +935,7 @@ int parse_def(enum gf_en gf,parsedargs_t*pa,image_desc_t *const im){ /* and keep a copy of the error */ char original_error[4096]; - strncpy(original_error,rrd_get_error(),sizeof(original_error)); + strncpy(original_error,rrd_get_error(),sizeof(original_error) - 1); /* and clear the error */ rrd_clear_error(); -- 2.47.2