diff --git a/arch/m68k/sun3/prom/printf.c b/arch/m68k/sun3/prom/printf.c index db5537ef1250..cb4934d39833 100644 --- a/arch/m68k/sun3/prom/printf.c +++ b/arch/m68k/sun3/prom/printf.c @@ -30,9 +30,9 @@ prom_printf(char *fmt, ...) #ifdef CONFIG_KGDB ppbuf[0] = 'O'; - vsprintf(ppbuf + 1, fmt, args) + 1; + vsnprintf(ppbuf + 1, sizeof(ppbuf) - 1, fmt, args); #else - vsprintf(ppbuf, fmt, args); + vsnprintf(ppbuf, sizeof(ppbuf), fmt, args); #endif bptr = ppbuf;