diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2015-09-11 00:52:51 +0000 |
---|---|---|
committer | hwu1225 <hwu1225@Edk2> | 2015-09-11 00:52:51 +0000 |
commit | a687f448f938f0660356f3c07e393f93ef7166c4 (patch) | |
tree | 33774ab328c45542706f4c80851df0dfe2b87be7 /NetworkPkg | |
parent | 21170d1fba4d45d16ddb03e331da704ec0d44266 (diff) | |
download | edk2-platforms-a687f448f938f0660356f3c07e393f93ef7166c4.tar.xz |
NetworkPkg: PXE Driver's LoadFile protocol should check FilePath
PXE driver's LoadFile protocol should check the input parameter
FilePath to see whether it's a supported device path.If not,
it should return invalid parameter, do not continue PXE boot.
(Sync patch r18436 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18441 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 4 |
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;
|