[EMAIL PROTECTED] wrote on 2001-11-22 03:15 UTC:
> The glibc 2.2.4 function mbrtowc() crashes.
>
> % cat glibcbug.c
> #include <wchar.h>
>
> main(){
> mbstate_t ps;
>
> mbrtowc(NULL, NULL, 0, &ps);
> }
This is a bug in your program, not in glibc. Add
memset(&ps, 0, sizeof(ps)); /* initialize multi-byte state */
to initialize the state with zero, as required by the ISO C standard.
Markus
--
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org, WWW: <http://www.cl.cam.ac.uk/~mgk25/>
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/