summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-29 03:42:33 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-29 03:42:33 +0000
commit39941daf90572c818328de50fbcb7a5e5e0e7eb2 (patch)
treebefc3af0896a172ac4ecefb5593d05db2c8584d0 /MdeModulePkg/Universal/Network
parent9c10bff352e0310c98841cbc7f93bb20c2eebbf2 (diff)
downloadedk2-platforms-39941daf90572c818328de50fbcb7a5e5e0e7eb2.tar.xz
Fix incorrect error handling when PXE boot timeout.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8675 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index 646638674c..15444c1083 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -2639,7 +2639,7 @@ EfiPxeLoadFile (
if (sizeof (UINTN) < sizeof (UINT64) && (TmpBufSize > 0xFFFFFFFF)) {
Status = EFI_DEVICE_ERROR;
- } else if (*BufferSize >= (UINTN) TmpBufSize && Buffer != NULL) {
+ } else if (TmpBufSize > 0 && *BufferSize >= (UINTN) TmpBufSize && Buffer != NULL) {
*BufferSize = (UINTN) TmpBufSize;
Status = PxeBc->Mtftp (
PxeBc,
@@ -2653,7 +2653,7 @@ EfiPxeLoadFile (
NULL,
FALSE
);
- } else {
+ } else if (TmpBufSize > 0) {
*BufferSize = (UINTN) TmpBufSize;
Status = EFI_BUFFER_TOO_SMALL;
}