From d130204df3256c39e104aa9a4346d116458c745e Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Sat, 10 Aug 2013 09:10:56 -0700 Subject: [PATCH] curl_json plugin: avoid unlikely overrun Signed-off-by: Florian Forster --- src/curl_json.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/curl_json.c b/src/curl_json.c index deee460b..89fce164 100644 --- 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) -- 2.30.2