]> Kevux Git Server - fll/commitdiff
Update: Add terminating NULL position and set all values to 0.
authorKevin Day <thekevinday@gmail.com>
Sat, 26 Feb 2022 04:21:57 +0000 (22:21 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 26 Feb 2022 04:21:57 +0000 (22:21 -0600)
level_1/fl_print/c/private-print.c

index e4af7059432dfed82c7bc2d9260f29a3337071e3..0d60d2cd6b4ff9a84a6ba5e1ce700f99b8959f6d 100644 (file)
@@ -1031,8 +1031,11 @@ extern "C" {
       }
       else if (type == f_print_format_type_double_32_e || type == f_print_format_type_double_64_e) {
         int f = 0;
-        char format[32];
-        char buffer[128];
+        char format[33];
+        char buffer[129];
+
+        memset(format, 0, 33);
+        memset(buffer, 0, 129);
 
         format[f++] = f_string_ascii_percent_s.string[0];