diff options
author | 2013-03-07 18:12:31 +0000 | |
---|---|---|
committer | 2013-03-07 18:12:31 +0000 | |
commit | ad13b59622bd3cec830a28c0329ac439a90f48a6 (patch) | |
tree | f66792f4fc5f198eb2d3028065ab8513dbf72f4b /lib/libc | |
parent | fix atrocious code, do socket -> FILE* conversion correctly, with proper (diff) | |
download | wireguard-openbsd-ad13b59622bd3cec830a28c0329ac439a90f48a6.tar.xz wireguard-openbsd-ad13b59622bd3cec830a28c0329ac439a90f48a6.zip |
Fix return value of wcrtomb() in single-byte locales if the s argument is NULL.
wcrtomb() must pretend to store one byte (NUL-terminator) in this case.
Patch by Vladimir Tamara Patino. ok guenther
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/citrus/citrus_none.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/citrus/citrus_none.c b/lib/libc/citrus/citrus_none.c index deed3aa8634..ac51aff381a 100644 --- a/lib/libc/citrus/citrus_none.c +++ b/lib/libc/citrus/citrus_none.c @@ -1,4 +1,4 @@ -/* $OpenBSD: citrus_none.c,v 1.4 2012/12/05 23:19:59 deraadt Exp $ */ +/* $OpenBSD: citrus_none.c,v 1.5 2013/03/07 18:12:31 stsp Exp $ */ /* $NetBSD: citrus_none.c,v 1.18 2008/06/14 16:01:07 tnozaki Exp $ */ /*- @@ -115,7 +115,7 @@ _citrus_none_ctype_wcrtomb(char * __restrict s, /* ps appears to be unused */ if (s == NULL) - return (0); + return (1); if (wc < 0 || wc > 0xff) { errno = EILSEQ; |