summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-11-02 16:04:13 +0100
committerTom Rini <trini@konsulko.com>2024-11-14 18:14:06 -0600
commitb891826067c2d51cdb0f46b3763642bf8484ebb8 (patch)
treed3fc65db8d6ea754f1d0e367b10f1b4af10a3d7a
parent504f36ed7a5273599813de10810b6e8b421289c4 (diff)
upl: fix parsing of DT property
When calling decode_addr_size() we must pass the size of the device-tree property and not sizeof(void *). Fixes: 90469da3da0d ("upl: Add support for reading a upl handoff") Addresses-Coverity-ID: 510459 Wrong sizeof argument Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--boot/upl_read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/upl_read.c b/boot/upl_read.c
index 5063897a132..be3e1d116e1 100644
--- a/boot/upl_read.c
+++ b/boot/upl_read.c
@@ -520,7 +520,7 @@ static int decode_upl_graphics(struct upl *upl, ofnode node)
return log_msg_ret("reg", -EINVAL);
}
- len = decode_addr_size(upl, buf, sizeof(buf), &gra->reg);
+ len = decode_addr_size(upl, buf, size, &gra->reg);
if (len < 0)
return log_msg_ret("buf", len);