From: steven pratt <slpratt@us.ibm.com>
To: linux-kernel@vger.kernel.org, alan@redhat.com, marcelo@hera.kernel.org
Cc: slpratt@us.ibm.com
Subject: [PATCH] sscanf doesn't handle %x in 2.4.20
Date: Fri, 13 Dec 2002 10:47:39 -0600 [thread overview]
Message-ID: <3DFA0F2B.8080001@us.ibm.com> (raw)
In vsscanf in vsprintf.c incorectly uses isdigit to check for a leading
numeric
after finding a %x and setting the base to 16. This breaks device
mapper under
certain conditions. Following patch is backport from 2.5.50.
--- vsprintf.c Thu Oct 11 13:17:22 2001
+++ /usr/src/linux-2.4.20/lib/vsprintf.c Fri Dec 13 09:57:14 2002
@@ -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) {
reply other threads:[~2002-12-13 16:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3DFA0F2B.8080001@us.ibm.com \
--to=slpratt@us.ibm.com \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@hera.kernel.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
Powered by JetHome