[Bug 877] HUSH: parse error in "echo a | if true; then cat ; fi" leads to out of memory

bugzilla at busybox.net bugzilla at busybox.net
Tue Jan 12 12:34:25 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=877





--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com>  2010-01-12 12:34:25 UTC ---
Fix:

--- busybox.8/shell/hush.c      2010-01-12 11:56:36.000000000 +0100
+++ busybox.9/shell/hush.c      2010-01-12 13:33:46.540495850 +0100
@@ -6535,6 +6541,9 @@ static struct pipe *parse_stream(char **
                                 * with redirect_opt_num(), but bash doesn't do
it.
                                 * "echo foo 2| cat" yields "foo 2". */
                                done_command(&ctx);
+#if !BB_MMU
+                               o_reset_to_empty_unquoted(&ctx.as_string);
+#endif
                        }
                        goto new_cmd;
                case '(':


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list