[Bug 272218] mbsinit returns true for a state that is not in the initial state
Date: Mon, 26 Jun 2023 07:49:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272218 --- Comment #1 from bruno@clisp.org --- The cause is that the file src/lib/libc/locale/mbrtocXX_iconv.h puts some data into the mbstate_t. Whereas the mbsinit() function, as defined in src/lib/libc/locale/mbsinit.c, tests only a single word from this state. mbsinit() should return 0 if ((_ConversionState *)ps)->srcbuf_len > 0 || ((_ConversionState *)ps)->dstbuf_len > 0. -- You are receiving this mail because: You are the assignee for the bug.