Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 1999 07:31:10 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        peter@FreeBSD.org (Peter Wemm)
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/net res_send.c
Message-ID:  <199909291131.HAA16874@hda.hda.com>
In-Reply-To: <199909281540.IAA71052@freefall.freebsd.org> from Peter Wemm at "Sep 28, 99 08:40:18 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> peter       1999/09/28 08:40:18 PDT
> 
>   Modified files:
>     lib/libc/net         res_send.c 
>   Log:
>   Fix previous commit.  The standards specifically say:  "The structure
>   sigaction, used to describe an action to be taken, is defined in the
>   header <signal.h> to include at least the following members:"
>                                ^^^^^^^^
>   A sigaction defined on stack with essentially random contents may have
>   just about anything underneath fields that the program doesn't know about.
>   It is not safe to delete the bzero.

It goes on to say:

"Adding extensions to this structure, which might change the behavior
of the application with respect to this standard when those fields
in the structue are uninitialized, also requires that the extensions
be enabled as required by 1.3.1.1"

1.3.1.1 Paragraph 2:

"The system may provide additional functions or facilities not
required by this standard.  Nonstandard extensions should be
identified as such in the system documentation.  Nonstandard
extensions, when used, may change the behavior of functions or
facilities defined by this standard.  The conformance document
shall define an environment in which an application can be run with
the behavior specified by the standard.  In no case shall such an
environment require modification of a Strictly Conforming POSIX.1
Application".

Adding a bzero to protect against unknown, unspecified, and not
explicitly enabled extensions should be avoided.  IMHO the non-bzeroed
case should work on all flavors of FBSD.  I know where Bruce is coming
from, I realize that we haven't enabled the strict environment,
but in my opinion on any sensible system the bzero shouldn't be needed.

Peter

-- 
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Safety critical systems, Agency approval


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




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