From: chip Date: Tue, 10 Jun 2003 15:17:32 +0000 (+0000) Subject: 2003-06-10 Chip Salzenberg X-Git-Tag: nfs-utils-1-1-0-pre6~3 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1486c0972d17f2e213b1005e0ef1dfd91f4a155a;p=nfs-utils.git 2003-06-10 Chip Salzenberg * support/nfs/xlog.c (xlog): Fix off-by-one buffer overflow bug. * debian/changelog: Version 1.0.3-2. --- diff --git a/ChangeLog b/ChangeLog index 7b93669..0c3295c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-10 Chip Salzenberg + + * support/nfs/xlog.c (xlog): Fix off-by-one buffer overflow bug. + * debian/changelog: Version 1.0.3-2. + 2003-05-30 Michael Griffith NeilBrown diff --git a/debian/changelog b/debian/changelog index ff84c2a..12e2886 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nfs-utils (1:1.0.3-2) unstable; urgency=high + + * Upstream CVS sync: + > Fix one-byte buffer overflow in logging code. + + -- Chip Salzenberg Tue, 10 Jun 2003 11:11:56 -0400 + nfs-utils (1:1.0.3-1) unstable; urgency=low * New upstream version: diff --git a/support/nfs/xlog.c b/support/nfs/xlog.c index 90c7e63..c4e7ea1 100644 --- a/support/nfs/xlog.c +++ b/support/nfs/xlog.c @@ -142,9 +142,9 @@ xlog(int kind, const char *fmt, ...) return; va_start(args, fmt); - vsnprintf(buff, sizeof (buff), fmt, args); + vsnprintf(buff, sizeof (buff) - 2, fmt, args); va_end(args); - buff[sizeof (buff) - 1] = 0; + buff[sizeof (buff) - 2] = 0; if ((n = strlen(buff)) > 0 && buff[n-1] != '\n') { buff[n++] = '\n'; buff[n++] = '\0';