Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Nov 2002 23:31:24 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Julian Elischer <julian@elischer.org>
Cc:        Nate Lawson <nate@root.org>, Tim Robbins <tjr@FreeBSD.ORG>, FreeBSD current users <current@FreeBSD.ORG>
Subject:   Re: Sign fixes for disklabel(8)
Message-ID:  <20021116232441.H18454-100000@gamplex.bde.org>
In-Reply-To: <Pine.BSF.4.21.0211160011590.50399-200000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 16 Nov 2002, Julian Elischer wrote:

> On Fri, 15 Nov 2002, Nate Lawson wrote:
> > In the overflow case, strtoul returns ULONG_MAX.  Or if you're interested
> > in catching invalid characters, use endptr.
>
> I'm not that interested in catching those cases.. they were not caught
> before and I'm looking for the minimal diff..
>
> I've just removed the clause. See new patch attached..

Removing clauses gives maximal diffs and loses even some of the sub-minimal
bounds checking (values less than 0 were just errors in some cases, but
they are now converted to large unsigned values and not checked at all).

> A sensible thing might be to compare against a "sensible" value
> but who knows what that value should be?

Values should only be restricted to avoid ones that can't possibly work.
This is mostly already done.

> I include the new diff for your coments

I'll wait for a later one with more of the suggested changes incorporated
(strtoul() should use base 10, and most things shouldn't be changed, etc.).

Bruce


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?20021116232441.H18454-100000>