projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c023314
)
curl_json plugin: avoid unlikely overrun
author
Jim Radford
<radford@galvanix.com>
Sat, 10 Aug 2013 16:10:56 +0000
(09:10 -0700)
committer
Florian Forster
<octo@collectd.org>
Mon, 19 Aug 2013 14:50:53 +0000
(16:50 +0200)
Signed-off-by: Florian Forster <octo@collectd.org>
src/curl_json.c
patch
|
blob
|
history
diff --git
a/src/curl_json.c
b/src/curl_json.c
index
deee460
..
89fce16
100644
(file)
--- a/
src/curl_json.c
+++ b/
src/curl_json.c
@@
-500,6
+500,7
@@
static int cj_config_add_key (cj_t *db, /* {{{ */
len = ptr-name;
if (len == 0)
break;
+ len = COUCH_MIN(len, sizeof (ent)-1);
sstrncpy (ent, name, len+1);
if (c_avl_get (tree, ent, (void *) &value) != 0)