From bcc91ecbc37c68390f3c9339cb51428c30dd2b1e Mon Sep 17 00:00:00 2001 From: Julian Ste <31321934+julian-st@users.noreply.github.com> Date: Sat, 19 Oct 2019 13:53:21 +0200 Subject: [PATCH] initilize variables in print_number --- cJSON.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cJSON.c b/cJSON.c index 85e8ba6..9dfaa24 100644 --- a/cJSON.c +++ b/cJSON.c @@ -487,9 +487,9 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out double d = item->valuedouble; int length = 0; size_t i = 0; - unsigned char number_buffer[26]; /* temporary buffer to print the number into */ + unsigned char number_buffer[26] = {0}; /* temporary buffer to print the number into */ unsigned char decimal_point = get_decimal_point(); - double test; + double test = 0.0; if (output_buffer == NULL) {