Submit #2920 » eilseq_fix.patch
| lib/libc/locale/ascii.c | ||
|---|---|---|
|
if (dst == NULL) {
|
||
|
s = memchr(*src, '\0', nms);
|
||
|
if (*s & 0x80) {
|
||
|
*src = s;
|
||
|
errno = EILSEQ;
|
||
|
return ((size_t)-1);
|
||
|
}
|
||
| ... | ... | |
|
nchr = 0;
|
||
|
while (len-- > 0 && nwc-- > 0) {
|
||
|
if (*s < 0 || *s > 127) {
|
||
|
*src = s;
|
||
|
errno = EILSEQ;
|
||
|
return ((size_t)-1);
|
||
|
}
|
||
| lib/libc/locale/none.c | ||
|---|---|---|
|
nchr = 0;
|
||
|
while (len-- > 0 && nwc-- > 0) {
|
||
|
if (*s < 0 || *s > UCHAR_MAX) {
|
||
|
*src = s;
|
||
|
errno = EILSEQ;
|
||
|
return ((size_t)-1);
|
||
|
}
|
||