There is a simple bug in below code and will cause PXE always
returning invalid parameter:
if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {
return EFI_INVALID_PARAMETER;
FilePath should *not* be end node, so return invalid parameter
when FilePath *is* device path end.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <[email protected]>
Cc: Feng Tian <[email protected]>
Cc: Zhang Lubo <[email protected]>
---
MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index 89977e6..1c7b664 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -2776,7 +2776,7 @@ EfiPxeLoadFile (
UINT64 TmpBufSize;
BOOLEAN MediaPresent;
- if (FilePath == NULL || !IsDevicePathEnd (FilePath)) {
+ if (FilePath == NULL || IsDevicePathEnd (FilePath)) {
return EFI_INVALID_PARAMETER;
}
--
2.6.2
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel