diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index dddf1286ac884eabc1d35114c157c48a586d54d9..beb7fa8333ccdd6861c9e4040a3f69c3d8120c02 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -230,10 +230,7 @@ class LLLeapImpl: public LLLeap
                 // childout (well, up to a max length) to log what was wrong.
                 LLProcess::ReadPipe::size_type
                     readlen((std::min)(childout.size(), LLProcess::ReadPipe::size_type(80)));
-                std::vector<char> buffer(readlen + 1);
-                childstream.read(&buffer[0], readlen);
-                buffer[childstream.gcount()] = '\0';
-                bad_protocol(STRINGIZE(expect << char(colon) << &buffer[0]));
+                bad_protocol(STRINGIZE(expect << char(colon) << childout.read(readlen)));
             }
             else
             {