From 1afdde421fa0bbfa05c79ff6d1922012ee1ca2eb Mon Sep 17 00:00:00 2001 From: xtne6f Date: Mon, 29 Feb 2016 05:17:28 +0900 Subject: [PATCH] Fix lsp_url_encode() Dst might be 3 times as large as the input --- src/mod_lua.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_lua.inl b/src/mod_lua.inl index 6a467254..9d04d5f9 100644 --- a/src/mod_lua.inl +++ b/src/mod_lua.inl @@ -704,7 +704,7 @@ lsp_url_encode(lua_State *L) int num_args = lua_gettop(L); const char *text; size_t text_len; - char dst[512]; + char dst[512 * 3]; if (num_args == 1) { text = lua_tolstring(L, 1, &text_len);