From: Kevin Corry <corryk@us.ibm.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "LKML" <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.20: lib/vsprintf.c: Fix vsscanf of hex digits
Date: Fri, 31 Jan 2003 15:15:09 -0600 [thread overview]
Message-ID: <03013115150902.15537@boiler> (raw)
Hi,
The current vsscanf() in 2.4 does not correctly scan hex digits that begin
with a-f. (It does work correctly for hex digits that begin with 0-9). This
patch fixes that bug, and is based on the fix that was added to 2.5.
--
Kevin Corry
corryk@us.ibm.com
http://evms.sourceforge.net/
--- linux-2.4.20a/lib/vsprintf.c Tue Jan 21 11:12:02 2003
+++ linux-2.4.20b/lib/vsprintf.c Tue Jan 21 11:11:49 2003
@@ -637,7 +637,11 @@
while (isspace(*str))
str++;
- if (!*str || !isdigit(*str))
+ if (!*str
+ || (base == 16 && !isxdigit(*str))
+ || (base == 10 && !isdigit(*str))
+ || (base == 8 && (!isdigit(*str) || *str > '7'))
+ || (base == 0 && !isdigit(*str)))
break;
switch(qualifier) {
next reply other threads:[~2003-01-31 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 21:15 Kevin Corry [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-05 15:31 [PATCH] 2.4.20: lib/vsprintf.c: Fix vsscanf of hex digits Kevin Corry
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=03013115150902.15537@boiler \
--to=corryk@us.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.