httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Re: ap_log_error wants a string literal in mod_lua
Date Fri, 07 Oct 2011 09:26:43 GMT
> > When trunk with (hardened) gcc 4.6 on Ubuntu beta, I get:
> > 
> > lua_config.c: In function 'cmd_log_at':
> > lua_config.c:177:5: error: format not a string literal and no
> > format arguments [-Werror=format-security]
> > cc1: some warnings being treated as errors
> > 
> > 
> > The appropriate source:
> >     lua_Debug dbg;
> >     
> >     lua_getstack(L, 1, &dbg);
> >     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);
> > 
> > 
> > Is there anything we can do to fix this so it builds again
> > with paranoia options?
> 
> How about:
> 
> ap_log_error(dbg.source, dbg.currentline, APLOG_MODULE_INDEX, level,
> 0, cmd->server, "%s", msg);

appears in one more place -- if you're fine with this solution,
I'll commit it.
 
> Regards
> 
> Rüdiger

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257

Mime
View raw message