diff options
author | Rabin Vincent <rabin@rab.in> | 2014-11-21 23:05:22 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-24 12:06:06 -0500 |
commit | f3a05c8f944ab2cd832e69a5705708ee7a1797fa (patch) | |
tree | e2b345315b669ef5855b1737de7628b1c08c1c6c /common/cli_hush.c | |
parent | dee332ffb735f65ab922118791a583c17bb0b795 (diff) | |
download | u-boot-imx-f3a05c8f944ab2cd832e69a5705708ee7a1797fa.zip u-boot-imx-f3a05c8f944ab2cd832e69a5705708ee7a1797fa.tar.gz u-boot-imx-f3a05c8f944ab2cd832e69a5705708ee7a1797fa.tar.bz2 |
Revert "hush: fix segfault on syntax error"
128059b92 ("hush: fix segfault on syntax error") attempted to fix a
segfault on syntax errors, but it broke Ctrl-C handling, and the
assumption that it made, that rcode could not be -1, is incorrect.
Revert this change.
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Reported-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Diffstat (limited to 'common/cli_hush.c')
-rw-r--r-- | common/cli_hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cli_hush.c b/common/cli_hush.c index d643912..296542f 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -3217,7 +3217,7 @@ static int parse_stream_outer(struct in_str *inp, int flag) } b_free(&temp); /* loop on syntax errors, return on EOF */ - } while (rcode != 1 && !(flag & FLAG_EXIT_FROM_LOOP) && + } while (rcode != -1 && !(flag & FLAG_EXIT_FROM_LOOP) && (inp->peek != static_peek || b_peek(inp))); #ifndef __U_BOOT__ return 0; |