]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: pxe_utils: sysboot: fix crash if either board or soc are not set.
authorDimitri John Ledkov <xnox@ubuntu.com>
Wed, 21 Apr 2021 11:42:01 +0000 (12:42 +0100)
committerRamon Fried <rfried.dev@gmail.com>
Fri, 18 Jun 2021 08:29:17 +0000 (11:29 +0300)
commitb6b4279a105ec017169ed4d6646a782a7d4116f3
tree04c108a4eb6cb40360d8c608507ff6f37dc7e0be
parentd4de983d839dc0193b0c0973cbd65c9a20f67b59
cmd: pxe_utils: sysboot: fix crash if either board or soc are not set.

If the environment does not have "soc" or "board" set, and fdtdir
option is specified in extlinux.conf, the bootloader will crash whilst
dereferencing a null pointer. Add a guard against null soc or
board. Fixes a crash of qemu-riscv64_smode configuration, which does
not have CONFIG_SYS_SOC defined.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
cmd/pxe_utils.c