summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e5eb5f)
raw | patch | inline | side by side (parent: 3e5eb5f)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 20:12:18 +0000 (22:12 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 2 Jul 2017 20:12:18 +0000 (22:12 +0200) |
CC src/write_mongodb_la-write_mongodb.lo
src/write_mongodb.c: In function ‘wm_config’:
src/write_mongodb.c:371:55: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 114 [-Wformat-truncation=]
snprintf(cb_name, sizeof(cb_name), "write_mongodb/%s", node->name);
^~
src/write_mongodb.c:371:5: note: ‘snprintf’ output between 15 and 142 bytes into a destination of size 128
snprintf(cb_name, sizeof(cb_name), "write_mongodb/%s", node->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/write_mongodb.c: In function ‘wm_config’:
src/write_mongodb.c:371:55: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 114 [-Wformat-truncation=]
snprintf(cb_name, sizeof(cb_name), "write_mongodb/%s", node->name);
^~
src/write_mongodb.c:371:5: note: ‘snprintf’ output between 15 and 142 bytes into a destination of size 128
snprintf(cb_name, sizeof(cb_name), "write_mongodb/%s", node->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/write_mongodb.c | patch | blob | history |
diff --git a/src/write_mongodb.c b/src/write_mongodb.c
index 2cb4537ba043bcff633a212752a9e46bf7f4bbab..37e34098f1769e73fb84128e287dfe23f357249f 100644 (file)
--- a/src/write_mongodb.c
+++ b/src/write_mongodb.c
}
if (status == 0) {
- char cb_name[DATA_MAX_NAME_LEN];
+ char cb_name[sizeof("write_mongodb/") + DATA_MAX_NAME_LEN];
snprintf(cb_name, sizeof(cb_name), "write_mongodb/%s", node->name);