]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
initilize variables in print_number
authorJulian Ste <31321934+julian-st@users.noreply.github.com>
Sat, 19 Oct 2019 11:53:21 +0000 (13:53 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Oct 2019 11:53:21 +0000 (13:53 +0200)
cJSON.c

diff --git a/cJSON.c b/cJSON.c
index 85e8ba64baf809e643f7913476bf9c70db267837..9dfaa24160b40675a4288014269999d6f553c6de 100644 (file)
--- 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)
     {