From: Guenter Knauf Date: Mon, 3 Jun 2013 22:05:07 +0000 (+0000) Subject: Fixed crash condition when r.module_info() is called X-Git-Tag: 2.5.0-alpha~5385 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d56029a0b7b8765411e18821a657470255fbb4;p=thirdparty%2Fapache%2Fhttpd.git Fixed crash condition when r.module_info() is called for modules which dont have directives. Bug found and fix submitted by gsmith, slightly modified by fuankg. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1489199 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 828fc2b6f57..e1c925d0811 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -1236,7 +1236,7 @@ static int lua_ap_module_info(lua_State *L) luaL_checktype(L, 1, LUA_TSTRING); moduleName = lua_tostring(L, 1); mod = ap_find_linked_module(moduleName); - if (mod) { + if (mod && mod->cmds) { const command_rec *cmd; lua_newtable(L); lua_pushstring(L, "commands");