From: Simon Glass Date: Thu, 27 Jul 2023 03:01:25 +0000 (-0600) Subject: bootstd: Init the size before reading extlinux file X-Git-Tag: v2023.10-rc2~6^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11158aef8939bb6e54361e4dae3809a9cbe78cff;p=pandora-u-boot.git bootstd: Init the size before reading extlinux file The implementation in extlinux_pxe_getfile() does not pass a valid size to bootmeth_read_file(), so this can fail if the uninited value happens to be too small. Fix this. Signed-off-by: Simon Glass --- diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c index ce986bd260d..8d489a11aa4 100644 --- a/boot/bootmeth_pxe.c +++ b/boot/bootmeth_pxe.c @@ -31,6 +31,9 @@ static int extlinux_pxe_getfile(struct pxe_context *ctx, const char *file_path, int ret; addr = simple_strtoul(file_addr, NULL, 16); + + /* Allow up to 1GB */ + *sizep = 1 << 30; ret = bootmeth_read_file(info->dev, info->bflow, file_path, addr, sizep); if (ret)