]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Make HttpBootGetBootFile return EFI_BUFFER_TOO_SMALL
authorGary Lin <glin@suse.com>
Mon, 9 May 2016 04:32:55 +0000 (12:32 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Fri, 13 May 2016 02:09:21 +0000 (10:09 +0800)
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>
NetworkPkg/HttpBootDxe/HttpBootClient.c

index 9d445e3c8e7c59f8698c029b91a53d4f9e41d498..46cf9ca6fb78e49cc48ed5cf1cb1f7c5d3b94133 100644 (file)
@@ -1074,6 +1074,8 @@ HttpBootGetBootFile (
 \r
   if (*BufferSize < ContentLength) {\r
     Status = EFI_BUFFER_TOO_SMALL;\r
+  } else {\r
+    Status = EFI_SUCCESS;\r
   }\r
   *BufferSize = ContentLength;\r
 \r
@@ -1089,7 +1091,7 @@ HttpBootGetBootFile (
     HttpFreeMsgParser (Parser);\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
   \r
 ERROR_6:\r
   if (Parser != NULL) {\r