Always use format strings in dcb_printf
The luafilter didn't use a format string with dcb_printf which can lead to unexpected results if the returned string contains printf special characters.
This commit is contained in:
@ -570,7 +570,7 @@ static void diagnostic(FILTER *instance, void *fsession, DCB *dcb)
|
||||
lua_gettop(my_instance->global_lua_state);
|
||||
if (lua_isstring(my_instance->global_lua_state, -1))
|
||||
{
|
||||
dcb_printf(dcb, lua_tostring(my_instance->global_lua_state, -1));
|
||||
dcb_printf(dcb, "%s", lua_tostring(my_instance->global_lua_state, -1));
|
||||
dcb_printf(dcb, "\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user