aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openssl.c b/src/openssl.c
index f9ff4d5..562927d 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -4544,8 +4544,8 @@ static int sx_setAlpnProtos(lua_State *L) {
}
done:
luaL_pushresult(&B);
-
- if (0 != SSL_CTX_set_alpn_protos(ctx, (const unsigned char*)lua_tostring(L, -1), protos_len)) {
+ tmp = lua_tolstring(L, -1, &len);
+ if (0 != SSL_CTX_set_alpn_protos(ctx, (const unsigned char*)tmp, len)) {
lua_pushnil(L);
return 1;
}