Skip to content

Commit

Permalink
Fixed stack variable used beyond its scope in boota command
Browse files Browse the repository at this point in the history
  • Loading branch information
zbalaton committed Feb 20, 2018
1 parent f6402c1 commit 119aa27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions board/ACube/common/cmd_boota.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,19 @@ int do_boota(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
env = getenv("boot1");
if(env) {
PRINTF("found: %s\n",env);
if(is_good_bootsource(env)) argarray[argcnt++]=env;
if(is_good_bootsource(env)) argarray[argcnt++]=strdup(env);
}

env = getenv("boot2");
if(env) {
PRINTF("found: %s\n",env);
if(is_good_bootsource(env)) argarray[argcnt++]=env;
if(is_good_bootsource(env)) argarray[argcnt++]=strdup(env);
}

env = getenv("boot3");
if(env) {
PRINTF("found: %s\n",env);
if(is_good_bootsource(env)) argarray[argcnt++]=env;
if(is_good_bootsource(env)) argarray[argcnt++]=strdup(env);
}

PRINTF("First-level bootloader: got %u valid boot sources\n", argcnt);
Expand Down

0 comments on commit 119aa27

Please sign in to comment.