From f7c3cba4155e42f079c6ddb9fa77d0d5ef0921cb Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 18 Sep 2019 11:06:41 +0200 Subject: [PATCH] fix possible vulnerability --- src/Mod/Path/Gui/Command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/Gui/Command.cpp b/src/Mod/Path/Gui/Command.cpp index b6f2af7aff..bb58a9f5fb 100644 --- a/src/Mod/Path/Gui/Command.cpp +++ b/src/Mod/Path/Gui/Command.cpp @@ -115,7 +115,7 @@ void CmdPathArea::activated(int iMsg) openCommand("Create Path Area"); doCommand(Doc,"import PathCommands"); for(const std::string &cmd : cmds) - doCommand(Doc,cmd.c_str()); + doCommand(Doc,"%s", cmd.c_str()); doCommand(Doc,"FreeCAD.activeDocument().addObject('Path::FeatureArea','%s')",FeatName.c_str()); doCommand(Doc,"FreeCAD.activeDocument().%s.Sources = [ %s ]",FeatName.c_str(),sources.str().c_str()); commitCommand(); @@ -324,7 +324,7 @@ void CmdPathShape::activated(int iMsg) openCommand("Create Path Shape"); doCommand(Doc,"import PathCommands"); for(const std::string &cmd : cmds) - doCommand(Doc,cmd.c_str()); + doCommand(Doc, "%s", cmd.c_str()); doCommand(Doc,"FreeCAD.activeDocument().addObject('Path::FeatureShape','%s')",FeatName.c_str()); doCommand(Doc,"FreeCAD.activeDocument().%s.Sources = [ %s ]",FeatName.c_str(),sources.str().c_str()); commitCommand();