[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: coredump in wcscasecmp



"Petr Vandrovec" <VANDROVE@vc.cvut.cz> writes:

>   I'm maintaining ncpfs, which uses wide character functions and
> localization functions together. I now found, that probably updates
> done on 2000-02-12 by Ulrich broke something. If I run this
> program, I get segfault in towlower() invoked by wcscasecmp() :-(

Fixed now, at least for the C locale.  I'll have to see whether
something is wrong for other locales as well.  I forgot to add
initializers for both endianesses since this is not anymore necessary
for 2.2.  Thanks,

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: locale/C-ctype.c
===================================================================
RCS file: /cvs/glibc/libc/locale/C-ctype.c,v
retrieving revision 1.22.2.1
retrieving revision 1.22.2.2
diff -u -r1.22.2.1 -r1.22.2.2
--- C-ctype.c	2000/02/13 07:20:07	1.22.2.1
+++ C-ctype.c	2000/02/24 22:48:54	1.22.2.2
@@ -343,7 +343,7 @@
   _nl_C_name,
   NULL, 0, 0, /* no file mapped */
   UNDELETABLE,
-  15,
+  20,
   {
     { string: _nl_C_LC_CTYPE_class },
 #if BYTE_ORDER == LITTLE_ENDIAN
@@ -369,7 +369,14 @@
     { string: _nl_C_LC_CTYPE_width },
     { word: 1 },
     { string: "ANSI_X3.4-1968" },
+#if BYTE_ORDER == LITTLE_ENDIAN
+    { string: NULL },
+#endif
     { string: (const char *) (_nl_C_LC_CTYPE_toupper + 128) },
+    { string: NULL },
     { string: (const char *) (_nl_C_LC_CTYPE_tolower + 128) }
+#if BYTE_ORDER == BIG_ENDIAN
+    { string: NULL },
+#endif
   }
 };


Reply to: