From: Harlan Stenn Date: Thu, 10 Oct 2002 06:49:18 +0000 (-0400) Subject: Stop a buffer overflow. X-Git-Tag: NTP_4_1_1C_RC1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45ac6420405aff554b9dbd4fca83c339e458d405;p=thirdparty%2Fntp.git Stop a buffer overflow. From: Kris Kennaway bk: 3da522eehw2i0zpafm6mkPmkMktg8A --- diff --git a/libntp/msyslog.c b/libntp/msyslog.c index 98648814a..52da608f4 100644 --- a/libntp/msyslog.c +++ b/libntp/msyslog.c @@ -117,7 +117,7 @@ void msyslog(int level, const char *fmt, ...) *n++ = '\n'; *n = '\0'; - vsprintf(buf, nfmt, ap); + vsnprintf(buf, sizeof(buf), nfmt, ap); #if !defined(VMS) && !defined (SYS_VXWORKS) if (syslogit) #ifndef SYS_WINNT