This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20860] Incorrect return value in mbsnrtowcs()


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]