Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Apr 2001 01:33:41 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Matt Dillon <dillon@earth.backplane.com>, Mark.Andrews@nominum.com, Chris Byrnes <chris@jeah.net>, security@FreeBSD.ORG, brian@Awfulhak.org
Subject:   Re: ntpd patch 
Message-ID:  <200104060033.f360XfP03505@hak.lan.Awfulhak.org>
In-Reply-To: Message from "Andrey A. Chernov" <ache@nagual.pp.ru>  of "Fri, 06 Apr 2001 03:54:59 %2B0400." <20010406035459.A6350@nagual.pp.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, Apr 05, 2001 at 16:28:23 -0700, Matt Dillon wrote:
> >    Off-by-1 fix +
> >    buffer underflow	http://apollo.backplane.com/FreeBSD/ntpd-patch2.diff
> > 
> 
> For this one please change
> 
> +		while (tp != buf && isspace((int)(*(tp-1))))
> 
> to 
> 
> +		while (tp != buf && isspace((unsigned char)(*(tp-1))))
> 
> (int) cast is completely wrong and dangerous.

$ man isspace
.....
SYNOPSIS
     #include <ctype.h>

     int
     isspace(int c)
.....

I believe the int is correct.

> -- 
> Andrey A. Chernov
> http://ache.pp.ru/

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !



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?200104060033.f360XfP03505>