mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
NetworkPkg: Make HttpBootGetBootFile return EFI_BUFFER_TOO_SMALL
Per the description of HttpBootGetBootFile, the function should return EFI_BUFFER_TOO_SMALL if the given buffer is smaller than the remote image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
09991304c9
commit
a93786ae6c
@ -1074,6 +1074,8 @@ HttpBootGetBootFile (
|
|||||||
|
|
||||||
if (*BufferSize < ContentLength) {
|
if (*BufferSize < ContentLength) {
|
||||||
Status = EFI_BUFFER_TOO_SMALL;
|
Status = EFI_BUFFER_TOO_SMALL;
|
||||||
|
} else {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
*BufferSize = ContentLength;
|
*BufferSize = ContentLength;
|
||||||
|
|
||||||
@ -1089,7 +1091,7 @@ HttpBootGetBootFile (
|
|||||||
HttpFreeMsgParser (Parser);
|
HttpFreeMsgParser (Parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return Status;
|
||||||
|
|
||||||
ERROR_6:
|
ERROR_6:
|
||||||
if (Parser != NULL) {
|
if (Parser != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user