Revision: 18441
          http://sourceforge.net/p/edk2/code/18441
Author:   hwu1225
Date:     2015-09-11 00:52:51 +0000 (Fri, 11 Sep 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: Ye Ting <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/18436

Modified Paths:
--------------
    branches/UDK2015/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c

Modified: branches/UDK2015/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
===================================================================
--- branches/UDK2015/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c        2015-09-11 
00:52:31 UTC (rev 18440)
+++ branches/UDK2015/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c        2015-09-11 
00:52:51 UTC (rev 18441)
@@ -2328,6 +2328,10 @@
   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;


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to