]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
upl: fix parsing of DT property
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 2 Nov 2024 15:04:13 +0000 (16:04 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 15 Nov 2024 00:14:06 +0000 (18:14 -0600)
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>
boot/upl_read.c

index 5063897a1322cc191fd0cf697bf0875c119c7bbe..be3e1d116e12aa97acd97eacd904a29e724b834b 100644 (file)
@@ -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);