]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
soc: xilinx: versal: fix out of bounds array access
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Sat, 16 Apr 2022 18:15:30 +0000 (20:15 +0200)
committerMichal Simek <michal.simek@amd.com>
Fri, 13 May 2022 07:10:02 +0000 (09:10 +0200)
The call to xilinx_pm_request requires an array of a larger size.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Link: https://lore.kernel.org/r/20220416181530.2311155-1-jorge@foundries.io
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/soc/soc_xilinx_versal.c

index f8bcd9ab404d4561e7b7a0f2a31bea40a5f791bb..3d8c25c19bb64738ca2b3260c41a9173ef388dcd 100644 (file)
@@ -45,7 +45,7 @@ static const struct soc_ops soc_xilinx_versal_ops = {
 static int soc_xilinx_versal_probe(struct udevice *dev)
 {
        struct soc_xilinx_versal_priv *priv = dev_get_priv(dev);
-       u32 ret_payload[4];
+       u32 ret_payload[PAYLOAD_ARG_CNT];
        int ret;
 
        priv->family = versal_family;