From 0ed3f27db229e57e5e55ecea9a068ab9db4cb833 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 4 Feb 2014 15:51:28 -0500 Subject: [PATCH] VBOX: Sanitize vboxmanage's output before writing it to the trace log. --- samples/vboxwrapper/vbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 764626e603..63ad51ac22 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -2641,6 +2641,8 @@ int VBOX_VM::vbm_popen(string& command, string& output, const char* item, bool l do { retval = vbm_popen_raw(command, output, timeout); + sanitize_output(command); + sanitize_output(output); if (log_trace) { vbm_trace(command, output, retval); @@ -2695,8 +2697,6 @@ int VBOX_VM::vbm_popen(string& command, string& output, const char* item, bool l // Add all relivent notes to the output string and log errors // if (retval && log_error) { - sanitize_output(output); - if (!retry_notes.empty()) { output += "\nNotes:\n\n" + retry_notes; }