]> granicus.if.org Git - icinga2/commitdiff
Fix a potential crash in ExternalCommandListener::CommandPipeThread
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Aug 2014 21:35:11 +0000 (23:35 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Aug 2014 21:35:11 +0000 (23:35 +0200)
refs #6589

components/compat/externalcommandlistener.cpp

index f9361095518a2d79ad9773c82e02378625bc227f..55d744818bf29284600f92474fba6e83421b1c2d 100644 (file)
@@ -130,7 +130,7 @@ void ExternalCommandListener::CommandPipeThread(const String& commandPath)
                            (line[strlen(line) - 1] == '\r' || line[strlen(line) - 1] == '\n'))
                                line[strlen(line) - 1] = '\0';
 
-                       Utility::QueueAsyncCallback(boost::bind(&ExternalCommandListener::ExecuteCommand, line));
+                       Utility::QueueAsyncCallback(boost::bind(&ExternalCommandListener::ExecuteCommand, String(line)));
                }
 
                delete line;