Macro shell expansion fixes (rhbz#431009)
This commit is contained in:
parent
fbc9b689fb
commit
d3d60512bd
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue