aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar William Ahern <william+netbsd@25tandclement.com> 2016-08-12 20:38:44 +0000
committerLibravatarLibravatar William Ahern <william+netbsd@25tandclement.com> 2016-08-12 20:38:44 +0000
commit40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33 (patch)
treed3c164650b7ad3b31ef52582b7f52c172f8c44b3
parenteceb64a5ee4980a652cddf226f4e7a0d18080a3b (diff)
downloadluaossl-40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33.tar.gz
luaossl-40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33.tar.bz2
luaossl-40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33.zip
in bignum string conversion, don't pass char or signed char to isdigit or isxdigit
-rw-r--r--src/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 22c6e85..d8eebb5 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -1861,13 +1861,13 @@ static BIGNUM *(checkbig)(lua_State *L, int index, _Bool *lvalue) {
if (hex) {
luaL_argcheck(L, len > 2+(size_t)neg, index, "invalid hex string");
for (i = 2+neg; i < len; i++) {
- if (!isxdigit(str[i]))
+ if (!isxdigit((unsigned char)str[i]))
luaL_argerror(L, 1, "invalid hex string");
}
} else {
luaL_argcheck(L, len > neg, index, "invalid decimal string");
for (i = neg; i < len; i++) {
- if (!isdigit(str[i]))
+ if (!isdigit((unsigned char)str[i]))
luaL_argerror(L, 1, "invalid decimal string");
}
}