From 91b3f2b1d92d38f40c865afcff5fe7446b5ad3b3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 10 Jun 2014 00:45:12 +1000 Subject: [PATCH] memset the json err variable before use --- src/generator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generator.c b/src/generator.c index c689e934..e0f4c14a 100644 --- a/src/generator.c +++ b/src/generator.c @@ -702,6 +702,7 @@ static bool parse_method(proxy_instance_t *proxi, const char *msg) bool ret = false; const char *buf; + memset(&err, 0, sizeof(err)); val = json_loads(msg, 0, &err); if (!val) { LOGWARNING("JSON decode failed(%d): %s", err.line, err.text);