svn commit: r290313 - projects/collation/lib/libc/locale

Baptiste Daroussin bapt at FreeBSD.org
Mon Nov 2 22:56:25 UTC 2015


Author: bapt
Date: Mon Nov  2 22:56:24 2015
New Revision: 290313
URL: https://svnweb.freebsd.org/changeset/base/290313

Log:
  Fix mbtowc not setting EILSEQ on an Incomplete multibyte sequence for eucJP encoding

Modified:
  projects/collation/lib/libc/locale/euc.c

Modified: projects/collation/lib/libc/locale/euc.c
==============================================================================
--- projects/collation/lib/libc/locale/euc.c	Mon Nov  2 22:56:10 2015	(r290312)
+++ projects/collation/lib/libc/locale/euc.c	Mon Nov  2 22:56:24 2015	(r290313)
@@ -375,6 +375,7 @@ _EUC_mbrtowc_impl(wchar_t * __restrict p
 		/* Incomplete multibyte sequence */
 		es->want = want - i;
 		es->ch = wc;
+		errno = EILSEQ;
 		return ((size_t)-2);
 	}
 	if (pwc != NULL)


More information about the svn-src-projects mailing list