From 7cc0fc99c582f415da3380539fb620592bfc4b00 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 23 Jun 2011 09:47:10 +0300 Subject: [PATCH] Eliminate static BUFSIZ use in filelist parsing - In the unlikely event of filelist line being longer than BUFSIZ we'd previously end up truncating the line, which is stupid since we can just as easily make the buffer large enough. --- build/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/files.c b/build/files.c index 4f73548..beddc52 100644 --- a/build/files.c +++ b/build/files.c @@ -1769,7 +1769,7 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, fl.fileListRecsUsed = 0; for (ARGV_const_t fp = pkg->fileList; *fp != NULL; fp++) { - char buf[BUFSIZ]; + char buf[strlen(*fp) + 1]; const char *s = *fp; SKIPSPACE(s); if (*s == '\0') -- 2.7.4