]> git.baikalelectronics.ru Git - uboot.git/commit
xilinx: zynqmp: Use strlen only if env_get doesn't return null
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 20 Dec 2017 11:05:06 +0000 (16:35 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 30 Jan 2018 13:28:35 +0000 (14:28 +0100)
commit605f783b41e2dc5002ecaa5beac491b7d0c5d9cf
treed8f68b0a642c643f1796d30cc9103044c5334571
parentf1cea3b1b1bb9caff90936f6ece58bcf32d0467b
xilinx: zynqmp: Use strlen only if env_get doesn't return null

Add check if boot_targets exists in environment and then
generate new_targets env accordingly. Performing strlen on
null address causes it to fail with exception if isolation
is enabled with DDR address zero as secure. It works with out
isolation enabled as zero is valid address but it may lead to
junk values in boot_targets.
This patch fixes the issue by checking return value of env_get
so that it generate boot_targets properly.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c