From 4d02f245c360f1f8ce51c270bd12713ca9d5defa Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Tue, 30 Apr 2019 19:22:54 -0400 Subject: [PATCH] Use vsnprintf instead of vsprintf --- GRRLIB/GRRLIB/GRRLIB_gecko.c | 2 +- GRRLIB/GRRLIB/GRRLIB_print.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GRRLIB/GRRLIB/GRRLIB_gecko.c b/GRRLIB/GRRLIB/GRRLIB_gecko.c index ed4587c..3082c50 100644 --- a/GRRLIB/GRRLIB/GRRLIB_gecko.c +++ b/GRRLIB/GRRLIB/GRRLIB_gecko.c @@ -57,7 +57,7 @@ void GRRLIB_GeckoPrintf (const char *text, ...) { va_list argp; va_start(argp, text); - size = vsprintf(tmp, text, argp); + size = vsnprintf(tmp, sizeof(tmp), text, argp); va_end(argp); usb_sendbuffer_safe(1, tmp, size); diff --git a/GRRLIB/GRRLIB/GRRLIB_print.c b/GRRLIB/GRRLIB/GRRLIB_print.c index 1a98558..73b8bff 100644 --- a/GRRLIB/GRRLIB/GRRLIB_print.c +++ b/GRRLIB/GRRLIB/GRRLIB_print.c @@ -78,7 +78,7 @@ void GRRLIB_PrintBMF (const f32 xpos, const f32 ypos, va_list argp; va_start(argp, text); - size = vsprintf(tmp, text, argp); + size = vsnprintf(tmp, sizeof(tmp), text, argp); va_end(argp); for (i=0; i