Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 1998 12:02:35 -0700 (PDT)
From:      Anders.X.Thulin@telia.se
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/7320: init:single_user(): address of auto passed outside block
Message-ID:  <199807191902.MAA08905@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         7320
>Category:       bin
>Synopsis:       init:single_user(): address of auto passed outside block
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 19 12:10:00 PDT 1998
>Last-Modified:
>Originator:     Anders Thulin
>Organization:
(none)
>Release:        2.2.6 (Walnut Creek CD)
>Environment:
FreeBSD myname.my.domain 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #0: Wed Mar 25 02:28:49 GMT 1998
     jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC  i386
>Description:
Source: /usr/src/sbin/init/init.c, line 646.
The address of the auto variable altshell is passed outside the
block it has been defined in.
  Clearly dangerous practice. 
  The assignment occurs in line 646 of init.d, and altshell
is defined only a few lines higher up.
>How-To-Repeat:
Not applicable. I found the problem while linting the code.

>Fix:
Making altshell static is probably the quickest fix - and
one so obvious that you hardly need my suggestion. But
the type of problem suggest that the code may have been written
hastily in the first place, so there may be more problems lurking.
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807191902.MAA08905>