projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix rejection of dns responses with pointers past 512 byte offset
[musl]
/
src
/
multibyte
/
wctob.c
diff --git
a/src/multibyte/wctob.c
b/src/multibyte/wctob.c
index
d6353ee
..
b484a3f
100644
(file)
--- a/
src/multibyte/wctob.c
+++ b/
src/multibyte/wctob.c
@@
-1,8
+1,11
@@
-#include <stdio.h>
#include <wchar.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "internal.h"
int wctob(wint_t c)
{
if (c < 128U) return c;
+ if (MB_CUR_MAX==1 && IS_CODEUNIT(c)) return (unsigned char)c;
return EOF;
}