projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a2f6bf
)
ash: fix bad interaction between ash -c '....&' and bash compat
author
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 25 Nov 2008 01:34:52 +0000
(
01:34
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Tue, 25 Nov 2008 01:34:52 +0000
(
01:34
-0000)
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index d44de3319e179ea03a2808c0cd2073ea878db8ad..55a79a7a621a2f8c98b20cb431e448db5414bdfe 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-9189,8
+9189,9
@@
preadbuffer(void)
while (g_parsefile->strpush) {
#if ENABLE_ASH_ALIAS
- if (parsenleft == -1 && g_parsefile->strpush->ap &&
- parsenextc[-1] != ' ' && parsenextc[-1] != '\t') {
+ if (parsenleft == -1 && g_parsefile->strpush->ap
+ && parsenextc[-1] != ' ' && parsenextc[-1] != '\t'
+ ) {
return PEOA;
}
#endif
@@
-9314,6
+9315,9
@@
pfgets(char *line, int len)
static void
pungetc(void)
{
+ /* check is needed for ash -c 'echo 5&' + BASH_COMPAT to work */
+ if (parsenleft < 0)
+ return;
parsenleft++;
parsenextc--;
}