NetBSD Problem Report #2633
From gnats Tue Jul 16 02:05:26 1996
Received: from lerome.chautauqua.com by pain.lcs.mit.edu (8.7.5/8.7.3) with ESMTP id BAA24848 for <gnats-bugs@gnats.netbsd.org>; Tue, 16 Jul 1996 01:48:29 -0400 (EDT)
Message-Id: <199607160548.WAA04389@lerome.chautauqua.com>
Date: Mon, 15 Jul 1996 22:48:09 -0700 (PDT)
From: douzzer@mit.edu
Reply-To: douzzer@mit.edu
To: gnats-bugs@NetBSD.ORG
Subject: kprintf, small oversight in kern/subr_prf.c
X-Send-Pr-Version: 3.95
>Number: 2633
>Category: kern
>Synopsis: kprintf() array overrun
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 16 02:20:01 +0000 1996
>Closed-Date: Thu Jun 26 05:18:18 +0000 1997
>Last-Modified: Thu Jun 26 05:18:44 +0000 1997
>Originator: Daniel G. Pouzzner
>Release: 1.2 alpha of 22 jun 1996
>Organization:
just me
>Environment:
sparc IPX, currently 1.1 snap as listed below [not
relevant to PR]
>Description:
if you have a fmt string that ends in "%l" kprintf will just keep
hurtling right past the terminating null (gets defaulted out).
>How-To-Repeat:
(roll your own)
>Fix:
insert this right after "reswitch:" in ${sys}/kern/subr_prf.c
(at line 394 in v.1-2-1.25 (some time around 22 june)):
case '\0':
putchar('l', flags, tp); /* got at least one, anyway */
return;
the oversight is duplicated in ${sys}/lib/libsa/printf.c if that's of
any import.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: thorpej
State-Changed-When: Wed Jun 25 22:18:18 PDT 1997
State-Changed-Why:
Problem fixed (more-or-less) as suggested. thanks!
>Unformatted:
>System: NetBSD lerome 1.1 NetBSD 1.1 (GENERIC_SCSI3) #9: Tue Nov 21 20:15:17 MET 1995 pk@neon:/usr/src1/sys/arch/sparc/compile/GENERIC_SCSI3 sparc
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.