From 1e97a5e8d0515312906635cb11ff8b41cc8887ad Mon Sep 17 00:00:00 2001 From: Hleran Date: Tue, 28 Jul 2015 13:04:11 +0300 Subject: [PATCH] lua_plugin: malloc oversize --- plugins/lua/lua_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/lua/lua_plugin.c b/plugins/lua/lua_plugin.c index f0248cfc..0f339211 100644 --- a/plugins/lua/lua_plugin.c +++ b/plugins/lua/lua_plugin.c @@ -99,8 +99,8 @@ static int uwsgi_api_rpc(lua_State *L) { if (argc > 0) { uint8_t i; - argv = (char **) uwsgi_malloc(sizeof(char **)*argc); - argvs = (uint16_t *) uwsgi_malloc(sizeof(uint16_t *)*argc); + argv = (char **) uwsgi_malloc(sizeof(char *)*argc); + argvs = (uint16_t *) uwsgi_malloc(sizeof(uint16_t)*argc); for(i = 0; i < argc; i++) { argv[i] = (char *) lua_tolstring(L, i + 3, (size_t *) &argvs[i]); @@ -718,7 +718,7 @@ static int uwsgi_lua_init(){ ulua.wsapi_ref = uwsgi_malloc(sizeof(int) * uwsgi.numproc); for (i=0;i