This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: Crash (and crude workaround) for glibc2.x wcsxfrm()
- To: neideck@qkal.sap-ag.de
- Subject: Re: Crash (and crude workaround) for glibc2.x wcsxfrm()
- From: Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
- Date: 26 Apr 1999 10:29:33 +0200
- Cc: Geoff Keating <geoffk@ozemail.com.au>, libc-alpha@cygnus.com, drepper@cygnus.com (Ulrich Drepper)
- References: <199904221022.AA00700@stone.qkal.sap-ag.de>
The bug is actually in the LC_COLLATE data files, ie. in localedef, not in
libc. Note: YOU HAVE TO REGENERATE ALL LOCALE DATA FILES.
Andreas.
----------------------------------------------------------------------
1999-04-23 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* locale/programs/ld-collate.c (collate_output): Convert
undefined_offset to an array index. Fix computation of other
endian extra table.
--- libc-2.1/locale/programs/ld-collate.c.~1~ Mon Jan 25 20:15:30 1999
+++ libc-2.1/locale/programs/ld-collate.c Fri Apr 23 19:17:26 1999
@@ -608,6 +608,8 @@
size_t idx, cnt;
undefined_offset = obstack_object_size (&non_simple);
+ assert (undefined_offset % sizeof (u_int32_t) == 0);
+ undefined_offset /= sizeof (u_int32_t);
idx = collate->nrules;
for (cnt = 0; cnt < collate->nrules; ++cnt)
@@ -634,7 +636,7 @@
table2[cnt] = SWAPU32 (table[cnt]);
for (cnt = 0; cnt < extra_len / sizeof (u_int32_t); ++cnt)
- extra2[cnt] = SWAPU32 (extra2[cnt]);
+ extra2[cnt] = SWAPU32 (extra[cnt]);
/* We need a simple hashing table to get a collation-element->chars
mapping. We again use internal hashing using a secondary hashing
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org