]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Stop a buffer overflow.
authorHarlan Stenn <stenn@ntp.org>
Thu, 10 Oct 2002 06:49:18 +0000 (02:49 -0400)
committerHarlan Stenn <stenn@ntp.org>
Thu, 10 Oct 2002 06:49:18 +0000 (02:49 -0400)
From: Kris Kennaway <kris@obsecurity.org>

bk: 3da522eehw2i0zpafm6mkPmkMktg8A

libntp/msyslog.c

index 98648814ae11d239323092fecaf087be8946f67e..52da608f4db3a5a29d75d430de89ff73cd5d9ad9 100644 (file)
@@ -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