From 52dfaea4a992d2c58d6a41aae01c07c7d73d2213 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 14 Jul 2010 10:40:41 +0200 Subject: CCpp: abrt-debuginfo-install output lines can be long, accomodate them Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/Plugins/CCpp.cpp') 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; -- cgit