summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 7024f3a4..c6c32d1e 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -392,8 +392,12 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
return;
}
- char buff[1024];
- while (fgets(buff, sizeof(buff), pipeout_fp))
+ /* With 126 debuginfos I've seen lines 9k+ chars long...
+ * yet, having it truly unlimited is bad too,
+ * therefore we are using LARGE, but still limited buffer.
+ */
+ char *buff = xmalloc(64*1024);
+ while (fgets(buff, 64*1024, pipeout_fp))
{
strchrnul(buff, '\n')[0] = '\0';
@@ -416,6 +420,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir,
update_client("%s", buff);
}
}
+ free(buff);
fclose(pipeout_fp);
int status = 0;