public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1002110] New: vfscanf does not support "hh" conversion
@ 2015-12-04 1:41 bugzilla-daemon
2015-12-04 1:44 ` [Bug 1002110] " bugzilla-daemon
2015-12-08 20:44 ` bugzilla-daemon
0 siblings, 2 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-12-04 1:41 UTC (permalink / raw)
To: ecos-bugs
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002110
Bug ID: 1002110
Summary: vfscanf does not support "hh" conversion
Product: eCos
Version: 3.0
Target: All
Architecture/Host_ Other
OS:
Status: UNCONFIRMED
Severity: enhancement
Priority: low
Component: C library
Assignee: unassigned@bugs.ecos.sourceware.org
Reporter: 414256we@gmail.com
QA Contact: ecos-bugs@ecos.sourceware.org
CC: ecos-bugs@ecos.sourceware.org
While the standard said:
h Indicates that the conversion will be one of d, i, o, u, x, X, or n and
the next pointer is a pointer to a short int or unsigned short int
(rather than int).
hh As for h, but the next pointer is a pointer to a signed char or unsigned
char.
The C library in eCos implements as follow:
again:
c = *fmt++
switch (c) {
...
case 'h':
flags |= SHORT;
goto again;
...
}
it results that it treat "hh" as "h".
When we try to did something like this:
unsigned char c;
sscanf(str, "%hhx", &c);
a segmentfault was generated.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1002110] vfscanf does not support "hh" conversion
2015-12-04 1:41 [Bug 1002110] New: vfscanf does not support "hh" conversion bugzilla-daemon
@ 2015-12-04 1:44 ` bugzilla-daemon
2015-12-08 20:44 ` bugzilla-daemon
1 sibling, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-12-04 1:44 UTC (permalink / raw)
To: ecos-bugs
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002110
Lea <414256we@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|low |high
Severity|enhancement |critical
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1002110] vfscanf does not support "hh" conversion
2015-12-04 1:41 [Bug 1002110] New: vfscanf does not support "hh" conversion bugzilla-daemon
2015-12-04 1:44 ` [Bug 1002110] " bugzilla-daemon
@ 2015-12-08 20:44 ` bugzilla-daemon
1 sibling, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-12-08 20:44 UTC (permalink / raw)
To: ecos-bugs
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002110
Jonathan Larmour <jifl@ecoscentric.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|high |low
Status|UNCONFIRMED |RESOLVED
CC| |jifl@ecoscentric.com
Resolution|--- |WONTFIX
Severity|critical |enhancement
--- Comment #1 from Jonathan Larmour <jifl@ecoscentric.com> ---
The eCos C library was written to the ISO C 90 standard. The 'hh' size
specifier was added in the C99 standard. We do not have C99 support in this and
many other ways. So indeed %hhx would fail. Adding 'hh' support, along with
other C99 additions would be quite an enhancement, and is considered a low
priority at this time.
I suggest you use %c with the first element of a two char string (so you can
have a NULL terminator) followed by a call to strtoul() with base 16.
I'm marking this WONTFIX for now, although I'd have no problem with a tested
patch if one appeared.
Jifl
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1002110] vfscanf does not support "hh" conversion
2015-12-04 1:41 [Bug 1002110] New: " bugzilla-daemon
2015-12-04 1:44 ` [Bug 1002110] " bugzilla-daemon
@ 2015-12-08 20:44 ` bugzilla-daemon
1 sibling, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-12-08 20:44 UTC (permalink / raw)
To: unassigned
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002110
Jonathan Larmour <jifl@ecoscentric.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|high |low
Status|UNCONFIRMED |RESOLVED
CC| |jifl@ecoscentric.com
Resolution|--- |WONTFIX
Severity|critical |enhancement
--- Comment #1 from Jonathan Larmour <jifl@ecoscentric.com> ---
The eCos C library was written to the ISO C 90 standard. The 'hh' size
specifier was added in the C99 standard. We do not have C99 support in this and
many other ways. So indeed %hhx would fail. Adding 'hh' support, along with
other C99 additions would be quite an enhancement, and is considered a low
priority at this time.
I suggest you use %c with the first element of a two char string (so you can
have a NULL terminator) followed by a call to strtoul() with base 16.
I'm marking this WONTFIX for now, although I'd have no problem with a tested
patch if one appeared.
Jifl
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 1002110] vfscanf does not support "hh" conversion
2015-12-04 1:41 [Bug 1002110] New: " bugzilla-daemon
@ 2015-12-04 1:44 ` bugzilla-daemon
2015-12-08 20:44 ` bugzilla-daemon
1 sibling, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2015-12-04 1:44 UTC (permalink / raw)
To: unassigned
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002110
Lea <414256we@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|low |high
Severity|enhancement |critical
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-08 20:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 1:41 [Bug 1002110] New: vfscanf does not support "hh" conversion bugzilla-daemon
2015-12-04 1:44 ` [Bug 1002110] " bugzilla-daemon
2015-12-08 20:44 ` bugzilla-daemon
2015-12-04 1:41 [Bug 1002110] New: " bugzilla-daemon
2015-12-04 1:44 ` [Bug 1002110] " bugzilla-daemon
2015-12-08 20:44 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).