Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Nov 2002 14:34:31 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Bruce Evans <bde@zeta.org.au>, 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:  <20021116143431.A26786@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0211161317530.53326-200000@InterJet.elischer.org>; from julian@elischer.org on Sat, Nov 16, 2002 at 02:22:11PM -0800
References:  <20021116232441.H18454-100000@gamplex.bde.org> <Pine.BSF.4.21.0211161317530.53326-200000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* De: Julian Elischer <julian@elischer.org> [ Data: 2002-11-16 ]
	[ Subjecte: Re: Sign fixes for disklabel(8) ]
> +	u_int v;
> [...]
> +			v = strtoul(tp, NULL, 10);

strtoul returns 'unsigned long', not 'unsigned int', and this can
overflow.  The type of 'v' is poorly chosen, as bde said.  Yes it
was fine for 'atoi', but 'atoi' is not 'strtoul'.
-- 
Juli Mallett <jmallett@FreeBSD.org>
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.

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?20021116143431.A26786>