summaryrefslogtreecommitdiffstats
path: root/modules/lua
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2013-06-04 00:05:07 +0200
committerGuenter Knauf <fuankg@apache.org>2013-06-04 00:05:07 +0200
commit98d56029a0b7b8765411e18821a657470255fbb4 (patch)
treebb32d94e61f2e6ab3185621c1a7b36e021ddf479 /modules/lua
parentAdded new functions r:mkdir(), r:mkrdir(), r:rmdir() to mod_lua. (diff)
downloadapache2-98d56029a0b7b8765411e18821a657470255fbb4.tar.xz
apache2-98d56029a0b7b8765411e18821a657470255fbb4.zip
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
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/lua_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
index 828fc2b6f5..e1c925d081 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");