diff options
| -rw-r--r-- | src/openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index ab19410..f9ff4d5 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
| @@ -4537,7 +4537,7 @@ static int sx_setAlpnProtos(lua_State *L) { | |||
| 4537 | return luaL_argerror(L, 2, "array of strings expected"); | 4537 | return luaL_argerror(L, 2, "array of strings expected"); |
| 4538 | } | 4538 | } |
| 4539 | tmp = luaL_checklstring(L, -1, &len); | 4539 | tmp = luaL_checklstring(L, -1, &len); |
| 4540 | luaL_argcheck(L, len <= UCHAR_MAX, 2, "proto string too long"); | 4540 | luaL_argcheck(L, len > 0 && len <= UCHAR_MAX, 2, "proto string length invalid"); |
| 4541 | luaL_addchar(&B, (unsigned char)len); | 4541 | luaL_addchar(&B, (unsigned char)len); |
| 4542 | luaL_addlstring(&B, tmp, len); | 4542 | luaL_addlstring(&B, tmp, len); |
| 4543 | lua_pop(L, 1); | 4543 | lua_pop(L, 1); |
