From a80e3de39b605c6ffdad05101c7b43d5ab900e20 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Mon, 13 Jan 2020 23:09:00 +0000 Subject: [PATCH] powerpc/mpc85xx: Partially revert r356640 The count block was correct before. r356640 caused a read past the end of the tuple. --- sys/powerpc/mpc85xx/lbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/mpc85xx/lbc.c b/sys/powerpc/mpc85xx/lbc.c index 026c98a30ae7..afe68b86baf9 100644 --- a/sys/powerpc/mpc85xx/lbc.c +++ b/sys/powerpc/mpc85xx/lbc.c @@ -397,7 +397,7 @@ fdt_lbc_reg_decode(phandle_t node, struct lbc_softc *sc, } for (j = 0; j < size_cells; j++) { count <<= 32; - count |= reg[addr_cells + j]; + count |= reg[addr_cells + j - 1]; } reg += addr_cells - 1 + size_cells;