[PATCH 0/1] MR11562: cmd: Fix usage of uninitialized variable in node_build_parse.
I reproduced this bug when running cmd tests on a 32 bit build with optimizations disabled and debugging symbols enabled, built in Debian. It caused problems when processing a line like this `echo Hello & (echo Hello && echo Bye)`, the `done` variable would sometimes have a random non-zero value and cause `node_build_parse` to return when processing the `echo Hello` command inside the parenthesis context. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11562
From: Santino Mazza <smazza@codeweavers.com> --- programs/cmd/wcmdmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index d2250ce1bbd..882160dbedf 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2821,7 +2821,7 @@ static BOOL node_builder_parse(struct node_builder *builder, unsigned precedence CMD_FOR_CONTROL *for_ctrl = NULL; union token_parameter pmt; enum builder_token tkn; - BOOL done, do_echo = TRUE; + BOOL done = FALSE, do_echo = TRUE; #define ERROR_IF(x) if (x) {bogus_line = __LINE__; goto error_handling;} do -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11562
This merge request was approved by eric pouech. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11562
participants (3)
-
eric pouech (@epo) -
Santino Mazza -
Santino Mazza (@tati)