[Bug 272218] mbsinit returns true for a state that is not in the initial state

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272218

--- Comment #1 from [email protected] ---
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.