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.
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/trunk/edk2@18435
6f19259b-4bc3-4df7-8a09-
765794883524
UINT64 TmpBufSize;\r
BOOLEAN MediaPresent;\r
\r
+ if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+ \r
Private = PXEBC_PRIVATE_DATA_FROM_LOADFILE (This);\r
PxeBc = &Private->PxeBc;\r
NewMakeCallback = FALSE;\r
#include <Protocol/Ip4Config2.h>\r
\r
#include <Library/DebugLib.h>\r
+#include <Library/DevicePathLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r