aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/mutatorserver.c
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-03-13 10:47:53 +0000
committerbloodstalker <thabogre@gmail.com>2017-03-13 10:47:53 +0000
commit5a684004adffb20dfacfb5c436f756764b5170f1 (patch)
tree19e0d952777b03daf37831eb466cf1dd2678a3e9 /daemon/mutatorserver.c
parentadded a ctags target (diff)
downloadmutator-5a684004adffb20dfacfb5c436f756764b5170f1.tar.gz
mutator-5a684004adffb20dfacfb5c436f756764b5170f1.zip
trying to fix the tainted string issue
Diffstat (limited to '')
-rw-r--r--daemon/mutatorserver.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/daemon/mutatorserver.c b/daemon/mutatorserver.c
index 5965a69..4450583 100644
--- a/daemon/mutatorserver.c
+++ b/daemon/mutatorserver.c
@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*
/**********************************************************************************************************************/
/*inclusion directive*/
#include "mutatorserver.h"
+#include "daemon_aux.h"
/*standard headers*/
#include <stdio.h>
#include <stdlib.h>
@@ -91,8 +92,16 @@ int main (int argc, char *argv[])
puts("got command from client.");
- /*open pipe, run command*/
- clientistream = popen(client_message, "r");
+ if (cleanser(client_message))
+ {
+ /*open pipe, run command*/
+ clientistream = popen(client_message, "r");
+ }
+ else
+ {
+ puts("what are you trying to do exactly?");
+ continue;
+ }
if (clientistream == NULL)
{