projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbc9b68
)
Macro shell expansion fixes (rhbz#431009)
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 1 Feb 2008 09:09:13 +0000
(11:09 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 1 Feb 2008 09:09:13 +0000
(11:09 +0200)
rpmio/macro.c
patch
|
blob
|
history
diff --git
a/rpmio/macro.c
b/rpmio/macro.c
index
040b5a1
..
cef68bd
100644
(file)
--- a/
rpmio/macro.c
+++ b/
rpmio/macro.c
@@
-497,8
+497,11
@@
doShellEscape(MacroBuf mb, const char * cmd, size_t clen)
if ((shf = popen(pcmd, "r")) == NULL)
return 1;
- while(mb->nb > 0 && (c = fgetc(shf)) != EOF)
- SAVECHAR(mb, c);
+ while((c = fgetc(shf)) != EOF) {
+ if (mb->nb > 1) {
+ SAVECHAR(mb, c);
+ }
+ }
(void) pclose(shf);
/* XXX delete trailing \r \n */