Skip to content
Commit bc3f4651 authored by Peng Fan's avatar Peng Fan Committed by Heinrich Schuchardt
Browse files

efi_loader: loosen buffer parameter check in efi_file_read_int

This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1733817

,
but that fix was wrongly partial reverted.

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_PROTOCOL.Read() with *buffer_size=0 and buffer=NULL to
obtain the needed size before doing the actual read.

So remove the check only for directory reading, file reading already
do the check by itself.

Fixes: db12f518("efi_loader: implement non-blocking file services")
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Cc: Stefan Sørensen <stefan.sorensen@spectralink.com>
Tested-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent 6a2e26b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment