summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-06-23 09:47:10 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-06-23 09:47:10 +0300
commit7cc0fc99c582f415da3380539fb620592bfc4b00 (patch)
treebb76fc5ef3f9872dc77be1131ccc44db0e1f3e84 /build
parentfeb3f8d2376e94acf87f1c53df9b985ca7fad515 (diff)
downloadlibrpm-tizen-7cc0fc99c582f415da3380539fb620592bfc4b00.tar.gz
librpm-tizen-7cc0fc99c582f415da3380539fb620592bfc4b00.tar.bz2
librpm-tizen-7cc0fc99c582f415da3380539fb620592bfc4b00.zip
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.
Diffstat (limited to 'build')
-rw-r--r--build/files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/files.c b/build/files.c
index 4f73548f5..beddc5267 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')