From owner-svn-src-all@FreeBSD.ORG Tue Apr 21 10:49:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C28106566B; Tue, 21 Apr 2009 10:49:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EDB78FC0A; Tue, 21 Apr 2009 10:49:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3LAnelM080297; Tue, 21 Apr 2009 10:49:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3LAneMq080296; Tue, 21 Apr 2009 10:49:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200904211049.n3LAneMq080296@svn.freebsd.org> From: Colin Percival Date: Tue, 21 Apr 2009 10:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191351 - in stable/7/contrib/ntp: . ntpq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 10:49:41 -0000 Author: cperciva Date: Tue Apr 21 10:49:40 2009 New Revision: 191351 URL: http://svn.freebsd.org/changeset/base/191351 Log: MFH r191302: Fix a buffer overflow. For reasons of stack alignment, it does not appear that this is exploitable on any systems FreeBSD runs on, so this will not be getting a security advisory. Approved by: re (kib) Modified: stable/7/contrib/ntp/ (props changed) stable/7/contrib/ntp/ntpq/ntpq.c Modified: stable/7/contrib/ntp/ntpq/ntpq.c ============================================================================== --- stable/7/contrib/ntp/ntpq/ntpq.c Tue Apr 21 09:55:17 2009 (r191350) +++ stable/7/contrib/ntp/ntpq/ntpq.c Tue Apr 21 10:49:40 2009 (r191351) @@ -3185,9 +3185,9 @@ cookedprint( if (!decodeuint(value, &uval)) output_raw = '?'; else { - char b[10]; + char b[12]; - (void) sprintf(b, "%03lo", uval); + (void) snprintf(b, sizeof(b), "%03lo", uval); output(fp, name, b); } break;