iconv: fix missing bounds checking for shift_jis decoding
[musl.git] / src / ctype / iswpunct.c
blobf0b9ea0a4bfc4fc1e7161e5f19596f5bfd011494
1 #include <wctype.h>
3 static const unsigned char table[] = {
4 #include "punct.h"
5 };
7 int iswpunct(wint_t wc)
9 if (wc<0x20000U)
10 return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
11 return 0;
14 int __iswpunct_l(wint_t c, locale_t l)
16 return iswpunct(c);
19 weak_alias(__iswpunct_l, iswpunct_l);