diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-12 15:51:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-12 15:51:29 +0200 |
commit | d0db975a9f399140ddb7dacdfffaf098df3e249b (patch) | |
tree | 4b9cbdad519a80e410dea6c2a917d77bd3209ad5 /shell/ash.c | |
parent | 58cdca3984beb4e1019ef5ccf1dd7361f032a9a6 (diff) | |
download | busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.tar.gz busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.tar.bz2 busybox-w32-d0db975a9f399140ddb7dacdfffaf098df3e249b.zip |
post-1.16.1 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 34f70ecfc..e018e877b 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -5059,7 +5059,7 @@ static int is_hidden_fd(struct redirtab *rp, int fd) | |||
5059 | return 0; | 5059 | return 0; |
5060 | pf = g_parsefile; | 5060 | pf = g_parsefile; |
5061 | while (pf) { | 5061 | while (pf) { |
5062 | if (fd == pf->fd) { | 5062 | if (pf->fd > 0 && fd == pf->fd) { |
5063 | return 1; | 5063 | return 1; |
5064 | } | 5064 | } |
5065 | pf = pf->prev; | 5065 | pf = pf->prev; |
@@ -5424,7 +5424,11 @@ rmescapes(char *str, int flag) | |||
5424 | size_t fulllen = len + strlen(p) + 1; | 5424 | size_t fulllen = len + strlen(p) + 1; |
5425 | 5425 | ||
5426 | if (flag & RMESCAPE_GROW) { | 5426 | if (flag & RMESCAPE_GROW) { |
5427 | int strloc = str - (char *)stackblock(); | ||
5427 | r = makestrspace(fulllen, expdest); | 5428 | r = makestrspace(fulllen, expdest); |
5429 | /* p and str may be invalidated by makestrspace */ | ||
5430 | str = (char *)stackblock() + strloc; | ||
5431 | p = str + len; | ||
5428 | } else if (flag & RMESCAPE_HEAP) { | 5432 | } else if (flag & RMESCAPE_HEAP) { |
5429 | r = ckmalloc(fulllen); | 5433 | r = ckmalloc(fulllen); |
5430 | } else { | 5434 | } else { |