httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1180332 - in /httpd/httpd/trunk/modules/lua: lua_config.c lua_request.c
Date Sat, 08 Oct 2011 07:50:07 GMT
Author: sf
Date: Sat Oct  8 07:50:06 2011
New Revision: 1180332

URL: http://svn.apache.org/viewvc?rev=1180332&view=rev
Log:
Fix format string bugs in mod_lua. Found by gcc and pointed out by Igor Galic.

Modified:
    httpd/httpd/trunk/modules/lua/lua_config.c
    httpd/httpd/trunk/modules/lua/lua_request.c

Modified: httpd/httpd/trunk/modules/lua/lua_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_config.c?rev=1180332&r1=1180331&r2=1180332&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_config.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_config.c Sat Oct  8 07:50:06 2011
@@ -174,7 +174,8 @@ static int cmd_log_at(lua_State *L, int 
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
-    ap_log_error(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0, cmd->server,
msg);
+    ap_log_error(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0,
+                 cmd->server, "%s", msg);
     return 0;
 }
 

Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=1180332&r1=1180331&r2=1180332&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Sat Oct  8 07:50:06 2011
@@ -399,7 +399,8 @@ static int req_log_at(lua_State *L, int 
     lua_getinfo(L, "Sl", &dbg);
 
     msg = luaL_checkstring(L, 2);
-    ap_log_rerror(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0, r, msg);
+    ap_log_rerror(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level, 0,
+                  r, "%s", msg);
     return 0;
 }
 



Mime
View raw message