From: Hans Freitag <macrotron@president.eu.org>
To: linux-kernel@vger.kernel.org
Subject: sscanf()/vsscanf() isn't able to handle Hex digits
Date: Sun, 3 Mar 2002 13:38:02 +0100 [thread overview]
Message-ID: <20020303133802.A5430@darkzone.president.eu.org> (raw)
Hi,
I'm using kernel 2.4.18-pre9.
I want to parse a mac adress within a kernel module. I want to
use int sscanf(const char *buf, const char *fmt, ...) .
This function is located in /usr/src/linux/lib/vsprintf.c .
Mac addresses like 6f:6f:7f:9a:10:11 are parsed correctly,
fd:23:22:fd:df:77 fails.
The reason is located in vsprintf.c line 640:
if (!*str || !isdigit(*str))
break;
I think isxdigit(*str) might be better here.
bye
--
May the source be with you!
reply other threads:[~2002-03-03 15:35 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=20020303133802.A5430@darkzone.president.eu.org \
--to=macrotron@president.eu.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®