From owner-freebsd-current Sat Nov 16 14:34:32 2002 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id AF0DA37B401; Sat, 16 Nov 2002 14:34:31 -0800 (PST) Date: Sat, 16 Nov 2002 14:34:31 -0800 From: Juli Mallett To: Julian Elischer Cc: Bruce Evans , Nate Lawson , Tim Robbins , FreeBSD current users Subject: Re: Sign fixes for disklabel(8) Message-ID: <20021116143431.A26786@FreeBSD.org> References: <20021116232441.H18454-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from julian@elischer.org on Sat, Nov 16, 2002 at 02:22:11PM -0800 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Julian Elischer [ 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 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