This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20860] Incorrect return value in mbsnrtowcs()
- From: "igor.liferenko at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 17 Feb 2017 07:43:45 +0000
- Subject: [Bug libc/20860] Incorrect return value in mbsnrtowcs()
- Auto-submitted: auto-generated
- References: <bug-20860-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20860
--- Comment #2 from Igor Liferenko <igor.liferenko at gmail dot com> ---
I would like to add here rationale for such behavior, as I understand it:
If conversion is stopped because end of buffer is reached, mbsnrtowcs() does
not know if there is continuation or not - it cannot know (without reading
further bytes) if it is incorrect sequence or it is incomplete sequence (which
may be correct, and also may be incorrect).
--
You are receiving this mail because:
You are on the CC list for the bug.