git.samba.org
/
mat
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
util:charset: Return EILSEQ in smb_iconv() if newer libc is detected
[mat/samba.git]
/
lib
/
util
/
charset
/
iconv.c
diff --git
a/lib/util/charset/iconv.c
b/lib/util/charset/iconv.c
index bf561f26619d9764213dbf705e69942f9f996d23..e06fa2ca3962829f3e9139d4acaa6477175d5f6b 100644
(file)
--- a/
lib/util/charset/iconv.c
+++ b/
lib/util/charset/iconv.c
@@
-740,12
+740,12
@@
static size_t utf8_push(void *cd, const char **inbuf, size_t *inbytesleft,
}
if ((uc[1] & 0xfc) == 0xdc) {
- /* its the second part of a 4 byte sequence. Illegal */
+ errno = EILSEQ;
+#ifndef HAVE_ICONV_ERRNO_ILLEGAL_MULTIBYTE
if (in_left < 4) {
errno = EINVAL;
- } else {
- errno = EILSEQ;
}
+#endif
goto error;
}