diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 6a022d147892..71dd8d1f6318 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -328,7 +328,7 @@ msg(fmt, va_alist) (void) vfprintf(stderr, fmt, ap); (void) fflush(stdout); (void) fflush(stderr); - (void) vsprintf(lastmsg, fmt, ap); + (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); va_end(ap); }