Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 14:55:05 -0600
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.org
Subject:   Re: memset prototype changed?
Message-ID:  <20030218205505.GA85519@madman.celabo.org>
In-Reply-To: <xzpznotwei1.fsf@flood.ping.uio.no>
References:  <20030218105240.GH92966@rot13.obsecurity.org> <xzpheb1yhrq.fsf@flood.ping.uio.no> <20030218160442.GB81793@madman.celabo.org> <xzpznotwei1.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 18, 2003 at 08:55:02PM +0100, Dag-Erling Smorgrav wrote:
> "Jacques A. Vidrine" <nectar@FreeBSD.org> writes:
> > On Tue, Feb 18, 2003 at 12:01:29PM +0100, Dag-Erling Smorgrav wrote:
> > > The code that fails to compile is blatantly wrong:
> > > 
> > >     memset(schedule, 0, sizeof(schedule));
> > I wouldn't say `blantantly'.  The expressions `schedule' and
> > `&schedule' are equivalent when `schedule' is an array type.
> 
> ...but Key_schedule is an opaque type, so it is not correct to assume
> it's an array.

You won't get much argument from me about that.  Nonetheless, lots of
code `knows' that it is `unsigned char[8]' (it _is_ DES, after all,
where all the keys and operations are on 64 bits).  Unfortunately, some
of these practices were extended to the triple-DES interfaces as well...

Cheers,
-- 
Jacques A. Vidrine <nectar@celabo.org>          http://www.celabo.org/
NTT/Verio SME          .     FreeBSD UNIX     .       Heimdal Kerberos
jvidrine@verio.net     .  nectar@FreeBSD.org  .          nectar@kth.se

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




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