mbsnrtowcs/wcsnrtombs: Fix EILSEQ handling
authorJohn Marino <draco@marino.st>
Sun, 19 Jun 2016 07:39:34 +0000 (09:39 +0200)
committerJohn Marino <draco@marino.st>
Sun, 19 Jun 2016 09:10:17 +0000 (11:10 +0200)
commit9915e371b196ef063ed0bfddd33e797cd03c61ea
tree5739d9b4305c22365c51449890d404069dbccb72
parent6d2444c4cfa09766909b503f09481b11af9d31ac
mbsnrtowcs/wcsnrtombs: Fix EILSEQ handling

Originally reported on FreeBSD (PR 209907) by Roel Standaert, RockinRoel
noticed that DragonFly suffered the same bug.  When the title functions
encounter a character that cannot be converted, they should change the
src pointer to point to the character positioned immediately after the
failed character, but no such change was performed.

YellowRabbit improved on the FreeBSD patch addressing the bug with a
new version that eliminates possible NULL pointer dereferences.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2920>
lib/libc/locale/ascii.c
lib/libc/locale/none.c