diff options
author | Gary Lin <glin@suse.com> | 2016-05-09 12:32:55 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2016-05-13 10:09:21 +0800 |
commit | a93786ae6c4f8a92e216899c05366ba7aacf72e7 (patch) | |
tree | e2adec64495b989ff4fbd20a717141dd6c99c7f3 /NetworkPkg | |
parent | 09991304c94a42fa1184e1a4c34da5e5cfd8f9be (diff) | |
download | edk2-a93786ae6c4f8a92e216899c05366ba7aacf72e7.tar.gz edk2-a93786ae6c4f8a92e216899c05366ba7aacf72e7.tar.bz2 edk2-a93786ae6c4f8a92e216899c05366ba7aacf72e7.zip |
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>
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootClient.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c index 9d445e3c8e..46cf9ca6fb 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) {
|