NetBSD Problem Report #1646

From gnats  Wed Oct 18 08:27:59 1995
Received: from sonyinet.sony.co.jp by pain.lcs.mit.edu (8.6.9/8.6.9) with ESMTP id IAA22748 for <gnats-bugs@gnats.netbsd.org>; Wed, 18 Oct 1995 08:16:48 -0400
Message-Id: <199510181214.VAA13358@king-show.sys.ptg.sony.co.jp>
Date: Wed, 18 Oct 1995 21:14:47 +0900
From: enami tsugutomo <enami@sys.ptg.sony.co.jp>
Reply-To: enami@sys.ptg.sony.co.jp
To: gnats-bugs@gnats.netbsd.org
Subject: if_ppp.c references uninitialized auto variable
X-Send-Pr-Version: 3.95

>Number:         1646
>Category:       kern
>Synopsis:       if_ppp.c references uninitialized auto variable.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 08:35:03 +0000 1995
>Closed-Date:    Wed Feb 07 10:12:58 +0000 1996
>Last-Modified:  Wed Feb 07 10:18:06 +0000 1996
>Originator:     enami tsugutomo
>Release:        NetBSD-current Oct 08 or around
>Organization:
	Sony Corporation.
>Environment:
System: NetBSD king-show 1.0A NetBSD 1.0A (KINGSHOW) #0: Mon Oct 2 22:49:42 JST 1995 root@king-show:/usr/src/sys/arch/i386/compile/KINGSHOW i386

>Description:
	In the following piece of code, the auto variable `ilen' is used
	but not initialized.

static void
ppp_inproc(sc, m)
    struct ppp_softc *sc;
    struct mbuf *m;
{
    struct ifqueue *inq;
    int s, ilen, xlen, proto, rv;

		:

    if (sc->sc_flags & SC_LOG_INPKT) {
	printf("ppp%d: got %d bytes\n", sc->sc_if.if_unit, ilen);
	pppdumpm(m);
    }
>How-To-Repeat:
	Run pppd with kdebug 31 or so, the it reports in the /var/log/messages
		ppp0: got 0 bytes or ppp0: got -126324864 bytes
	and so on.
>Fix:
	Use it after initalized or never use it.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Wed Feb 7 05:12:58 EST 1996 
State-Changed-Why:  
Fixed (net/if_ppp.c, revision 1.26). 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.