Per the description of HttpBootGetBootFile, the function should return EFI_BUFFER_TOO_SMALL if the given buffer is smaller than the remote image.
Cc: Siyuan Fu <[email protected]> Cc: Jiaxin Wu <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <[email protected]> --- NetworkPkg/HttpBootDxe/HttpBootClient.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c index 9d445e3..46cf9ca 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.c +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c @@ -1074,6 +1074,8 @@ HttpBootGetBootFile ( if (*BufferSize < ContentLength) { Status = EFI_BUFFER_TOO_SMALL; + } else { + Status = EFI_SUCCESS; } *BufferSize = ContentLength; @@ -1089,7 +1091,7 @@ HttpBootGetBootFile ( HttpFreeMsgParser (Parser); } - return EFI_SUCCESS; + return Status; ERROR_6: if (Parser != NULL) { -- 2.8.2 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

