audk/MdePkg/Library/UefiDevicePathLib
Ruiyu Ni 647636e175 MdePkg/DevicePathLib: Fix FromText bug for multi-instance devicepath
UefiDevicePathLibConvertTextToDevicePath correctly detects when it
has hit a ',' splicing together multiple paths. However, the code
that tries to cope with it:
{code}
if (IsInstanceEnd) {
  DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (
                                   END_DEVICE_PATH_LENGTH);
  ASSERT (DeviceNode != NULL);
  SetDevicePathEndNode (DeviceNode);

  NewDevicePath = AppendDevicePathNode (DevicePath, DeviceNode);
  FreePool (DevicePath);
  FreePool (DeviceNode);
  DevicePath = NewDevicePath;
}
{code}
causes a problem. The END node that's appended it the node for the
entire list. So when the node is appended in AppendDevicePathNode,
it winds up disappearing. This leads to the path
'PciRoot(0x0),PciRoot(0x0)' parsing as if 'PciRoot(0x0)/PciRoot(0x0)'
were specified. These are two very different things.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-23 13:11:32 +08:00
..
DevicePathFromText.c MdePkg/DevicePathLib: Fix FromText bug for multi-instance devicepath 2017-03-23 13:11:32 +08:00
DevicePathToText.c MdePkg: Fix spec mismatch in string representation of EMMC dev node 2016-11-14 11:08:41 +08:00
DevicePathUtilities.c MdePkg UefiDevicePathLib: Validate before touch input buffer. 2016-11-09 17:49:17 +08:00
UefiDevicePathLib.c Add 4 APIs to DevicePathLib: ConvertDeviceNodeToText, ConvertDevicePathToText, ConvertTextToDeviceNode and ConvertTextToDevicePath. 2013-07-26 03:00:21 +00:00
UefiDevicePathLib.h MdePkg: Add bluetooth devicepath handling in device path library. 2015-05-06 02:41:37 +00:00
UefiDevicePathLib.inf MdePkg: Add UEFI2.5 Ramdisk device path definition 2015-07-08 05:49:07 +00:00
UefiDevicePathLib.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiDevicePathLibOptionalDevicePathProtocol.c Add 4 APIs to DevicePathLib: ConvertDeviceNodeToText, ConvertDevicePathToText, ConvertTextToDeviceNode and ConvertTextToDevicePath. 2013-07-26 03:00:21 +00:00
UefiDevicePathLibOptionalDevicePathProtocol.inf MdePkg/UefiDevicePathLib:Fix link error due to missing RamDisk GUIDs 2015-07-09 08:51:54 +00:00
UefiDevicePathLibOptionalDevicePathProtocol.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00