summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
index cdcf2f0d3e..367a1356ab 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
@@ -2328,6 +2328,10 @@ EfiPxeLoadFile (
EFI_STATUS Status;
BOOLEAN MediaPresent;
+ if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This);
Private = VirtualNic->Private;
PxeBc = &Private->PxeBc;