Skip to content
Snippets Groups Projects
Commit 11158aef authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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's avatarSimon Glass <sjg@chromium.org>
parent 2984d21a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment