]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
soc: xilinx: zynqmp: fix out of bounds array access
authorMichal Simek <michal.simek@xilinx.com>
Wed, 20 Apr 2022 07:39:04 +0000 (09:39 +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: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/5f1409de285d7454af171a54e5f115da9d82c44e.1650440343.git.michal.simek@xilinx.com
drivers/soc/soc_xilinx_zynqmp.c

index 7d33ce2163d85db6f39427cc5f6e4414f68a8e60..a71115b17ccd26199ef01c3bfd2a140ca960dea3 100644 (file)
@@ -49,7 +49,7 @@ static const struct soc_ops soc_xilinx_zynqmp_ops = {
 static int soc_xilinx_zynqmp_probe(struct udevice *dev)
 {
        struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
-       u32 ret_payload[4];
+       u32 ret_payload[PAYLOAD_ARG_CNT];
        int ret;
 
        priv->family = zynqmp_family;