From c92dff1ea9d864c3181cc3a662741b3a4ea53a8b Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Thu, 25 Jul 2024 12:23:33 +0200 Subject: Cleanup --- bxgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bxgen.c') diff --git a/bxgen.c b/bxgen.c index 7adc09a..eb1887c 100755 --- a/bxgen.c +++ b/bxgen.c @@ -2913,11 +2913,11 @@ void bx_log(i32 log_level, u32 line, c8 *file, c8 *format, ...) { return; } - c8 message[256]; + c8 message[256] = {0}; va_list ap; va_start(ap, format); - vsprintf(message, format, ap); + vsnprintf(message, sizeof message, format, ap); va_end(ap); fflush(stdout); @@ -3230,7 +3230,7 @@ int main(int argc, char **argv) { mainproc, CONV_CDECL, // calling convention "printf", // proc name - 1, // number of argument + 1, // number of arguments (Var[]) {{ // the first argument .num = 1, -- cgit v1.2.3