From fa4161853d130feafcbdef20e76b5a8d0b8e1734 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 8 Jul 2014 08:32:42 +0200 Subject: [PATCH] Increase command buffer to 128kB fixes #6662 --- components/compat/externalcommandlistener.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/compat/externalcommandlistener.cpp b/components/compat/externalcommandlistener.cpp index 91ad0a50f..437cf6943 100644 --- a/components/compat/externalcommandlistener.cpp +++ b/components/compat/externalcommandlistener.cpp @@ -119,9 +119,10 @@ void ExternalCommandListener::CommandPipeThread(const String& commandPath) return; } - char line[2048]; + const int linesize = 128 * 1024; + char *line = new char[linesize]; - while (fgets(line, sizeof(line), fp) != NULL) { + while (fgets(line, linesize, fp) != NULL) { // remove trailing new-line while (strlen(line) > 0 && (line[strlen(line) - 1] == '\r' || line[strlen(line) - 1] == '\n')) @@ -140,6 +141,7 @@ void ExternalCommandListener::CommandPipeThread(const String& commandPath) } } + delete line; fclose(fp); } }