diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-14 10:40:41 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-14 10:40:41 +0200 |
commit | 52dfaea4a992d2c58d6a41aae01c07c7d73d2213 (patch) | |
tree | e19372efb3288ef36fb03abb4333599995d43bad | |
parent | 572740249bc8aa593ab34d5c14abf033176a110d (diff) | |
download | abrt-52dfaea4a992d2c58d6a41aae01c07c7d73d2213.tar.gz abrt-52dfaea4a992d2c58d6a41aae01c07c7d73d2213.tar.xz abrt-52dfaea4a992d2c58d6a41aae01c07c7d73d2213.zip |
CCpp: abrt-debuginfo-install output lines can be long, accomodate them
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | lib/Plugins/CCpp.cpp | 9 |
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; |