mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: Linus Torvalds <torvalds@osdl.org>
Cc: Deepak Saxena <dsaxena@mvista.com>,
	linux-kernel@vger.kernel.org, marcelo.tosatti@cyclades.com.br
Subject: Re: [PATCH] Fix %x parsing in vsscanf()
Date: Tue, 23 Sep 2003 22:35:33 +0100	[thread overview]
Message-ID: <20030923213533.GN7665@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0309231421450.24527-100000@home.osdl.org>

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.

  reply	other threads:[~2003-09-23 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-23 21:22 Deepak Saxena
2003-09-23 21:26 ` viro
2003-09-23 21:28 ` Linus Torvalds
2003-09-23 21:35   ` viro [this message]
2003-09-23 22:16     ` Deepak Saxena
2003-09-23 22:26       ` viro
2003-09-24  1:02         ` Deepak Saxena
2003-09-24  0:55           ` viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030923213533.GN7665@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=dsaxena@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com.br \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®