This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1002106] New: Bugs in vfscanf.cxx to deal with utf-8
- From: bugzilla-daemon at ecoscentric dot com
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Fri, 20 Nov 2015 02:57:33 +0000
- Subject: [Bug 1002106] New: Bugs in vfscanf.cxx to deal with utf-8
- Authentication-results: sourceware.org; auth=none
- Authentication-results: mail.ecoscentric.com; dkim=permerror (bad message/signature format)
- Auto-submitted: auto-generated
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002106
Bug ID: 1002106
Summary: Bugs in vfscanf.cxx to deal with utf-8
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
Problem:
vfscanf have problem to deal with string in utf-8 format.
Analyze:
In function:
externC int
vfscanf (FILE *fp, const char *fmt0, va_list ap) __THROW {
u_char *fmt = (u_char *) fmt0;
It declared that:
char ccltab[256];
char curr_byte;
When a byte's highest bit(the sign bit) is set(e.g. 0xe5), doing the
following conversion:
(int)*CURR_POS
it surely will generates an integer that is larger than 256( Recall,
signed bit extension).
While try to combine it with:
ccltab[(int)*CURR_POS]
a fairly bug yields.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.