projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feb3f8d
)
Eliminate static BUFSIZ use in filelist parsing
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 23 Jun 2011 06:47:10 +0000
(09:47 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 23 Jun 2011 06:47:10 +0000
(09:47 +0300)
- 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
patch
|
blob
|
history
diff --git
a/build/files.c
b/build/files.c
index
4f73548
..
beddc52
100644
(file)
--- 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')