From 0606971cb408c9635f17db8862dd5aa92551735c Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 18 May 2018 10:53:16 +0200 Subject: Fix: missing NULL array terminator Make to sure to allocate enough space to store a NULL pointer at the termination of the pointer array. Then it could be browsed correctly Change-Id: I6d13ba63715e688cd8fdc634ceabb9d3ec84eb87 Signed-off-by: Romain Forlot --- src/plugins/influxdb-writer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/influxdb-writer.c b/src/plugins/influxdb-writer.c index 677bfd0..3cf37d7 100644 --- a/src/plugins/influxdb-writer.c +++ b/src/plugins/influxdb-writer.c @@ -108,7 +108,7 @@ CURL *make_curl_write_post(AFB_ApiT apiHandle, const char *url, json_object *met } serie = malloc(sizeof(struct series_t)); - post_data = calloc(lpd, sizeof(void*)); + post_data = calloc(lpd + 1, sizeof(void*)); for(i = 0; i < lpd; i++) { memset(serie, 0, sizeof(struct series_t)); -- cgit 1.2.3-korg