summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e170f35)
raw | patch | inline | side by side (parent: e170f35)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 20:07:59 +0000 (22:07 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 20:07:59 +0000 (22:07 +0200) |
src/write_redis.c: In function ‘wr_config’:
src/write_redis.c:222:53: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 116 [-Wformat-truncation=]
snprintf(cb_name, sizeof(cb_name), "write_redis/%s", node->name);
^~
src/write_redis.c:222:5: note: ‘snprintf’ output between 13 and 140 bytes into a destination of size 128
snprintf(cb_name, sizeof(cb_name), "write_redis/%s", node->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/write_redis.c:222:53: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 116 [-Wformat-truncation=]
snprintf(cb_name, sizeof(cb_name), "write_redis/%s", node->name);
^~
src/write_redis.c:222:5: note: ‘snprintf’ output between 13 and 140 bytes into a destination of size 128
snprintf(cb_name, sizeof(cb_name), "write_redis/%s", node->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/write_redis.c | patch | blob | history |
diff --git a/src/write_redis.c b/src/write_redis.c
index 7d383f95ef5367d9675042decd580da89402af1e..7be236ad089f3189a8ec07250fb1c1d2c9fc18a0 100644 (file)
--- a/src/write_redis.c
+++ b/src/write_redis.c
} /* for (i = 0; i < ci->children_num; i++) */
if (status == 0) {
- char cb_name[DATA_MAX_NAME_LEN];
+ char cb_name[sizeof("write_redis/") + DATA_MAX_NAME_LEN];
snprintf(cb_name, sizeof(cb_name), "write_redis/%s", node->name);