From owner-cvs-src-old@FreeBSD.ORG Tue Jun 7 05:04:56 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E30810656D1 for ; Tue, 7 Jun 2011 05:04:56 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7CE8FC08 for ; Tue, 7 Jun 2011 05:04:56 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5754u3n004919 for ; Tue, 7 Jun 2011 05:04:56 GMT (envelope-from ken@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5754u5m004918 for cvs-src-old@freebsd.org; Tue, 7 Jun 2011 05:04:56 GMT (envelope-from ken@repoman.freebsd.org) Message-Id: <201106070504.p5754u5m004918@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ken@repoman.freebsd.org using -f From: "Kenneth D. Merry" Date: Tue, 7 Jun 2011 05:04:37 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_prf.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2011 05:04:56 -0000 ken 2011-06-07 05:04:37 UTC FreeBSD src repository Modified files: sys/kern subr_prf.c Log: SVN rev 222804 on 2011-06-07 05:04:37Z by ken Set pca.p_bufr to NULL when we haven't allocated a buffer. Otherwise, p_bufr is set to garbage on the stack, and if that garbage happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf() will get called and attempt to fill the non-existent buffer. This is really only relevant for tprintf() (and only when the priority is not -1), but set it in uprintf() and ttyprintf() for completeness. The next step, to avoid log buffer scrambling, would be to add the PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics. Submitted by: rmacklem Found by: pho Revision Changes Path 1.143 +3 -0 src/sys/kern/subr_prf.c