You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2014/03/18 14:32:36 UTC
svn commit: r1578870 - /httpd/httpd/trunk/modules/lua/lua_vmprep.c
Author: humbedooh
Date: Tue Mar 18 13:32:36 2014
New Revision: 1578870
URL: http://svn.apache.org/r1578870
Log:
mod_lua: Actually check whether interpreting the base structure of a file works or not, don't just assume it works.
Modified:
httpd/httpd/trunk/modules/lua/lua_vmprep.c
Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.c?rev=1578870&r1=1578869&r2=1578870&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.c Tue Mar 18 13:32:36 2014
@@ -370,7 +370,12 @@ static apr_status_t vm_construct(lua_Sta
: lua_tostring(L, 0));
return APR_EBADF;
}
- lua_pcall(L, 0, LUA_MULTRET, 0);
+ if ( lua_pcall(L, 0, LUA_MULTRET, 0) == LUA_ERRRUN ) {
+ ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(01482)
+ "Error loading %s: %s", spec->file,
+ lua_tostring(L, -1));
+ return APR_EBADF;
+ }
}
#ifdef AP_ENABLE_LUAJIT