Project

General

Profile

eilseq_fix.patch

Patch - RockinRoel, 06/08/2016 04:06 AM

View differences:

lib/libc/locale/ascii.c
131 131
	if (dst == NULL) {
132 132
		s = memchr(*src, '\0', nms);
133 133
		if (*s & 0x80) {
134
			*src = s;
134 135
			errno = EILSEQ;
135 136
			return ((size_t)-1);
136 137
		}
......
175 176
	nchr = 0;
176 177
	while (len-- > 0 && nwc-- > 0) {
177 178
		if (*s < 0 || *s > 127) {
179
			*src = s;
178 180
			errno = EILSEQ;
179 181
			return ((size_t)-1);
180 182
		}
lib/libc/locale/none.c
170 170
	nchr = 0;
171 171
	while (len-- > 0 && nwc-- > 0) {
172 172
		if (*s < 0 || *s > UCHAR_MAX) {
173
			*src = s;
173 174
			errno = EILSEQ;
174 175
			return ((size_t)-1);
175 176
		}