X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiDevicePathLib%2FDevicePathFromText.c;h=37d7a1752b76a67222c1dd641f8cd2c9cf3a91ff;hp=008ec0b96c7480beb64d1c980c99230e52b5fdf7;hb=66a110d7c9a63aea280253de4d242e4a9037d4c3;hpb=5d6a5aee0ba4231fe0227c7c08e4203e4ad6d377 diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c index 008ec0b96c..37d7a1752b 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c @@ -567,7 +567,9 @@ DevPathFromTextGenericPath ( (UINT16) (sizeof (EFI_DEVICE_PATH_PROTOCOL) + DataLength) ); - StrToBuf ((UINT8 *) (Node + 1), DataLength, DataStr); + if (DataLength != 0) { + StrToBuf ((UINT8 *) (Node + 1), DataLength, DataStr); + } return Node; }