From 106ef81ef88284a22f04c768821da9b52c86baaf Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 25 Feb 2022 22:21:57 -0600 Subject: [PATCH] Update: Add terminating NULL position and set all values to 0. --- level_1/fl_print/c/private-print.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index e4af705..0d60d2c 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -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]; -- 1.8.3.1