Revision: 18440
http://sourceforge.net/p/edk2/code/18440
Author: hwu1225
Date: 2015-09-11 00:52:31 +0000 (Fri, 11 Sep 2015)
Log Message:
-----------
MdeModulePkg: 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 r18435 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/18435
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
Modified:
branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
===================================================================
--- branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
2015-09-11 00:52:06 UTC (rev 18439)
+++ branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
2015-09-11 00:52:31 UTC (rev 18440)
@@ -2776,6 +2776,10 @@
UINT64 TmpBufSize;
BOOLEAN MediaPresent;
+ if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Private = PXEBC_PRIVATE_DATA_FROM_LOADFILE (This);
PxeBc = &Private->PxeBc;
NewMakeCallback = FALSE;
Modified:
branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
===================================================================
--- branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
2015-09-11 00:52:06 UTC (rev 18439)
+++ branches/UDK2015/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
2015-09-11 00:52:31 UTC (rev 18440)
@@ -33,6 +33,7 @@
#include <Protocol/Ip4Config2.h>
#include <Library/DebugLib.h>
+#include <Library/DevicePathLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiDriverEntryPoint.h>
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits