Skip to content
Snippets Groups Projects
Commit f3a05c8f authored by Rabin Vincent's avatar Rabin Vincent Committed by Tom Rini
Browse files

Revert "hush: fix segfault on syntax error"


128059b9 ("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: default avatarStephen Warren <swarren@wwwdotorg.org>
Reported-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
parent dee332ff
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment