This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15948] New: localedef collation handling of <U0000>
- From: "jsm28 at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 12 Sep 2013 21:58:47 +0000
- Subject: [Bug libc/15948] New: localedef collation handling of <U0000>
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=15948
Bug ID: 15948
Summary: localedef collation handling of <U0000>
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
CC: drepper.fsp at gmail dot com
When a locale file has a collation entry for the NUL character <U0000>,
ld-collate.c sets up a zero-length wide-character sequence L"\0" for it. The
code is unprepared to handle nwcs == 0 and as a result allocates insufficient
memory. I don't have an example where this causes visible problems, but if you
insert an assertion next to the insufficient allocation: (cut-and-pasted diff)
@@ -2073,6 +2073,7 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
weightidx = output_weightwc (atwc.weightpool, atwc.collate,
runp);
+ assert (runp->nwcs > 0);
added = (1 + 1 + runp->nwcs - 1) * sizeof (int32_t);
if (sizeof (int) == sizeof (int32_t))
obstack_make_room (atwc.extrapool, added);
then you get corresponding assertion failures from "make
localedata/install-locales", the first one in ar_SA.UTF-8.
Testing a patch.
--
You are receiving this mail because:
You are on the CC list for the bug.