summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbxgen.c6
1 files changed, 3 insertions, 3 deletions
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,