Enabling warnings around format security

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-07 15:17:40 -07:00
committed by GitHub
40 changed files with 152 additions and 266 deletions
@@ -92,8 +92,7 @@ namespace AzManipulatorTestFramework
{
if (m_logging)
{
AZStd::string message = AZStd::string::format(format, args...);
AZ_Printf("[ActionDispatcher] %s", message.c_str());
AZ_Printf("ActionDispatcher", format, args...);
}
}
@@ -150,7 +149,7 @@ namespace AzManipulatorTestFramework
template <typename DerivedDispatcherT>
DerivedDispatcherT* ActionDispatcher<DerivedDispatcherT>::MouseLButtonDown()
{
Log("Mouse left button down");
Log("%s", "Mouse left button down");
MouseLButtonDownImpl();
return static_cast<DerivedDispatcherT*>(this);
}
@@ -158,7 +157,7 @@ namespace AzManipulatorTestFramework
template <typename DerivedDispatcherT>
DerivedDispatcherT* ActionDispatcher<DerivedDispatcherT>::MouseLButtonUp()
{
Log("Mouse left button up");
Log("%s", "Mouse left button up");
MouseLButtonUpImpl();
return static_cast<DerivedDispatcherT*>(this);
}
@@ -24,7 +24,7 @@ namespace AzManipulatorTestFramework
{
const char* error = "Couldn't add action to sequence, dispatcher is locked (you must call ResetSequence() \
before adding actions to this dispatcher)";
Log(error);
Log("%s", error);
AZ_Assert(false, "Error: %s", error);
}
@@ -108,7 +108,7 @@ namespace AzManipulatorTestFramework
RetainedModeActionDispatcher* RetainedModeActionDispatcher::ResetSequence()
{
Log("Resetting the action sequence");
Log("%s", "Resetting the action sequence");
m_actions.clear();
m_dispatcher.ResetEvent();
m_locked = false;