Date: Sat, 7 Apr 2001 08:29:13 +0300 From: Alex Popa <razor@ldc.ro> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: Brian Somers <brian@Awfulhak.org>, security@FreeBSD.ORG Subject: Re: ntpd patch Message-ID: <20010407082913.A8159@ldc.ro> In-Reply-To: <200104060038.UAA73318@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Thu, Apr 05, 2001 at 08:38:02PM -0400 References: <ache@nagual.pp.ru> <20010406035459.A6350@nagual.pp.ru> <200104060033.f360XfP03505@hak.lan.Awfulhak.org> <200104060038.UAA73318@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 05, 2001 at 08:38:02PM -0400, Garrett Wollman wrote: > <<On Fri, 06 Apr 2001 01:33:41 +0100, Brian Somers <brian@Awfulhak.org> said: > > > I believe the int is correct. > > You are mistaken. The purpose of the cast is to defeat the automatic > promotion from `char' to `int', which causes sign-extension if `char' > is signed. Casting to `unsigned char' prevents this from happening. AFAIK, the casts are applied *after* the default promtions. The only solution to defeating sign extension is to *declare* unsigned char. > > -GAWollman > ------------+------------------------------------------ Alex Popa, | "Artificial Intelligence is razor@ldc.ro| no match for Natural Stupidity" ------------+------------------------------------------ "It took the computing power of three C-64s to fly to the Moon. It takes a 486 to run Windows 95. Something is wrong here." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010407082913.A8159>