From 20c8578084314ec716171d0478b0205adddc5166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 10 Oct 2020 02:55:35 +0200 Subject: [PATCH] Fix use of possibly uninitialised memory --- json-rpc-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 33321d7..7ce8db6 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -2924,7 +2924,7 @@ json_rpc_call_raw (struct app_context *ctx, if (error) return error; - maybe_print_verbose (ctx, ATTR_INCOMING, buf->str, buf->len); + maybe_print_verbose (ctx, ATTR_INCOMING, buf->str, buf->len + 1); return NULL; }