From owner-cvs-all@FreeBSD.ORG Wed Jul 2 00:08:45 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BD8437B401; Wed, 2 Jul 2003 00:08:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26B3543FDF; Wed, 2 Jul 2003 00:08:45 -0700 (PDT) (envelope-from jkh@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6278i0U039355; Wed, 2 Jul 2003 00:08:44 -0700 (PDT) (envelope-from jkh@repoman.freebsd.org) Received: (from jkh@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6278iOC039354; Wed, 2 Jul 2003 00:08:44 -0700 (PDT) Message-Id: <200307020708.h6278iOC039354@repoman.freebsd.org> From: "Jordan K. Hubbard" Date: Wed, 2 Jul 2003 00:08:44 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/stdio vsnprintf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2003 07:08:46 -0000 jkh 2003/07/02 00:08:44 PDT FreeBSD src repository Modified files: lib/libc/stdio vsnprintf.c Log: When size is 1 should just null terminate the string. The dummy variable is made an array of two, to explicitly avoid stack corruption due to null-terminating (which is doesn't actually happen due to stack alignment padding). Submitted by: Ed Moy Obtained from: Apple Computer, Inc. Revision Changes Path 1.22 +5 -3 src/lib/libc/stdio/vsnprintf.c