Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263441AbTIWVfk (ORCPT ); Tue, 23 Sep 2003 17:35:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263445AbTIWVfk (ORCPT ); Tue, 23 Sep 2003 17:35:40 -0400 Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:22444 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S263441AbTIWVfg (ORCPT ); Tue, 23 Sep 2003 17:35:36 -0400 Date: Tue, 23 Sep 2003 22:35:33 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: Linus Torvalds Cc: Deepak Saxena , linux-kernel@vger.kernel.org, marcelo.tosatti@cyclades.com.br Subject: Re: [PATCH] Fix %x parsing in vsscanf() Message-ID: <20030923213533.GN7665@parcelfarce.linux.theplanet.co.uk> References: <20030923212207.GA25234@xanadu.az.mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1059 Lines: 26 On Tue, Sep 23, 2003 at 02:28:12PM -0700, Linus Torvalds wrote: > > On Tue, 23 Sep 2003, Deepak Saxena wrote: > > > > Another option is to put the check in simple_strtoul() and > > simple_strtoull() if that is preferred. I like this better b/c > > we only have the check once. > > I'd much rather fix strtoul[l](). In fact, strtoul[l]() _already_ accepts > the "0x" prefix - but it only does so if the "base" parameter is 0. > > Fixing strtoul[l] should fix vsscanf() automatically, no? So I don't see > the "have the check only once" argument. C99 on behaviour of %x: "Matches an optionally signed hexadecimal integer, whose format is the same as expected for the subject sequence of the strtoul function with the value 16 for the base argument." IOW, strtoul() is definitely the right place to fix that. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/