mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sscanf()/vsscanf() isn't able to handle Hex digits
@ 2002-03-03 12:38 Hans Freitag
  0 siblings, 0 replies; only message in thread
From: Hans Freitag @ 2002-03-03 12:38 UTC (permalink / raw)
  To: linux-kernel

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!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-03 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-03 12:38 sscanf()/vsscanf() isn't able to handle Hex digits Hans Freitag

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®