From 3b23471795963368028a662790b38724f16d91ce Mon Sep 17 00:00:00 2001 From: root Date: Sun, 14 Jul 1996 00:43:39 +0000 Subject: [PATCH] send stuff to xargs with null termination so that we can handle weird file names with quotes and spaces CVS patchset: 807 CVS date: 1996/07/14 00:43:39 --- build/reqprov.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/reqprov.c b/build/reqprov.c index 7662fb1..87e293f 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -164,7 +164,7 @@ int generateAutoReqProv(Header header, struct PackageRec *p) chdir("/"); } - execlp("xargs", "xargs", "ldd", NULL); + execlp("xargs", "xargs", "-0", "ldd", NULL); error(RPMERR_EXEC, "Couldn't exec ldd"); exit(RPMERR_EXEC); } @@ -196,6 +196,13 @@ int generateAutoReqProv(Header header, struct PackageRec *p) parseFileForProv(s, p); } writePtr = getStringBuf(writeBuff); + s = writePtr; + while (*s) { + if (*s == '\n') { + *s = '\0'; + } + s++; + } lddDead = 0; do { -- 2.7.4