getservbyport_r: fix out-of-bounds buffer read
[musl] / src / ctype / iswpunct.c
index a829745..f0b9ea0 100644 (file)
@@ -1,6 +1,6 @@
 #include <wctype.h>
 
-static unsigned char table[] = {
+static const unsigned char table[] = {
 #include "punct.h"
 };
 
@@ -10,3 +10,10 @@ int iswpunct(wint_t wc)
                return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
        return 0;
 }
+
+int __iswpunct_l(wint_t c, locale_t l)
+{
+       return iswpunct(c);
+}
+
+weak_alias(__iswpunct_l, iswpunct_l);