summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-09 09:58:35 +0100
committerSteve Sakoman <steve@sakoman.com>2022-06-15 04:33:06 -1000
commitea280917fc16a61b50738ddd03a6f85305f82cb0 (patch)
treefecd6b71a4e9f74e4baf4d61c688d1e798472db2
parentb85e29de4bca17834b003d499db5129fc5dee75e (diff)
downloadopenembedded-core-contrib-ea280917fc16a61b50738ddd03a6f85305f82cb0.tar.gz
uboot-sign: Fix potential index error issues
Someone reported that if some other shell function has left i or j set, the concat_dtb_helper function could fail. Add a small tweak to avoid this. [YOCTO #14815] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d219c97bdf5d30be89795fbf9b66ddc367bef384) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/uboot-sign.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 4ca8118eb2..31ffe1f472 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -134,6 +134,8 @@ concat_dtb_helper() {
if [ -n "${UBOOT_CONFIG}" ]
then
+ i=0
+ j=0
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do