From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104464 invoked by alias); 20 Nov 2015 02:57:40 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Received: (qmail 104438 invoked by uid 89); 20 Nov 2015 02:57:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_SUBJECT,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 20 Nov 2015 02:57:36 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id F4038A8A705; Fri, 20 Nov 2015 02:57:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com F4038A8A705 From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002106] New: Bugs in vfscanf.cxx to deal with utf-8 Date: Fri, 20 Nov 2015 02:57:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: C library X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: 414256we@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015/txt/msg00070.txt.bz2 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 assignee for the bug.