From 40951862e12fe8d9c2fd0ffd4f16e9fe4d951f33 Mon Sep 17 00:00:00 2001 From: William Ahern Date: Fri, 12 Aug 2016 20:38:44 +0000 Subject: in bignum string conversion, don't pass char or signed char to isdigit or isxdigit --- src/openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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"); } } -- cgit v1.2.3-59-g8ed1b