diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 744d5ecf6765e42d0ccf59e0cffc196a4f287d29..4e77795e39ec133bed91d8d977f229ee49aa7159 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -4064,10 +4064,7 @@ kwsys_stl::string SystemInformationImplementation::RunProcess(kwsys_stl::vector<
   while( ( pipe = kwsysProcess_WaitForData(gp,&data,&length,&timeout),
            (pipe == kwsysProcess_Pipe_STDOUT || pipe == kwsysProcess_Pipe_STDERR) ) ) // wait for 1s
     {
-    for(int i=0;i<length;i++)
-      {
-      buffer += data[i];
-      }
+      buffer.append(data, length);
     }
   kwsysProcess_WaitForExit(gp, 0);