[U-Boot] [PATCH 1/2] pci: Add boundary check for hose->regions

Simon Glass sjg at chromium.org
Fri Mar 22 07:53:23 UTC 2019


On Fri, 15 Mar 2019 at 23:32, Thierry Reding <thierry.reding at gmail.com> wrote:
>
> From: Thierry Reding <treding at nvidia.com>
>
> Make sure that we don't overflow the hose->regions array, otherwise we
> would end up overwriting the hose->region_count field and cause mayhem
> to ensue. Also print an error message when we'd be overflowing because
> it indicates that there aren't enough regions available and the number
> needs to be increased.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  drivers/pci/pci-uclass.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list