diff options
author | Peng Fan <peng.fan@nxp.com> | 2021-04-28 21:54:01 +0800 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-05-18 12:36:12 +0200 |
commit | bc3f46518176e541c767b099fb06ad1870d59fa5 (patch) | |
tree | 3512e762fa8928c66c490f24bc1ddcba0ac9531e /drivers/ddr/imx/imx8m/ddr_init.c | |
parent | 6a2e26b95f046a2973a95119910cbe2554c92b46 (diff) | |
download | u-boot-bc3f46518176e541c767b099fb06ad1870d59fa5.tar.gz u-boot-bc3f46518176e541c767b099fb06ad1870d59fa5.tar.xz u-boot-bc3f46518176e541c767b099fb06ad1870d59fa5.zip |
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: db12f518edb0("efi_loader: implement non-blocking file services")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefan Sørensen <stefan.sorensen@spectralink.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'drivers/ddr/imx/imx8m/ddr_init.c')
0 files changed, 0 insertions, 0 deletions