[PATCH v2] efi_loader: loosen buffer parameter check in efi_file_read

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Jul 22 12:22:14 CEST 2020

On 22.07.20 09:43, Stefan Sørensen wrote:
> When reading a directory, EFI_BUFFER_TOO_SMALL should be returned when
> the supplied buffer is too small, so a use-case is to call
> efi_file_read with *buffer_size=0 and buffer=NULL to obtain the needed
> size before doing the actual read.
> So move the buffer!=NULL check to after the buffer size has been checked.
> This fix allows the Redhat shim fallback to run and e.g. Fedora 32 now
> boots out of the box.
> Signed-off-by: Stefan Sørensen <stefan.sorensen at spectralink.com>

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

More information about the U-Boot mailing list