[PATCH v2] soc: xilinx: versal: fix out of bounds array access

Jorge Ramirez-Ortiz, Foundries jorge at foundries.io
Wed Apr 20 07:23:08 CEST 2022


On 16/04/22, Jorge Ramirez-Ortiz wrote:
> The call to xilinx_pm_request requires an array of a larger size.
> 
> Signed-off-by: Jorge Ramirez-Ortiz <jorge at foundries.io>
> ---
>  drivers/soc/soc_xilinx_versal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/soc_xilinx_versal.c b/drivers/soc/soc_xilinx_versal.c
> index f8bcd9ab40..3d8c25c19b 100644
> --- a/drivers/soc/soc_xilinx_versal.c
> +++ b/drivers/soc/soc_xilinx_versal.c
> @@ -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];


all good? can this be merged?



>  	int ret;
>  
>  	priv->family = versal_family;
> -- 
> 2.34.1
> 


More information about the U-Boot mailing list