audk/MdePkg
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
..
Include MdePkg/HiiImageEx: Fix incorrect comments of functions 2017-03-15 10:03:23 +08:00
Library MdePkg/DevicePathLib: Fix FromText bug for multi-instance devicepath 2017-03-23 13:11:32 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdePkg.dec MdePkg/Include: Add SmiHandlerProfileLib.h 2017-02-22 15:28:09 +08:00
MdePkg.dsc MdePkg/dsc: add SmiHandlerProfileLib to dsc. 2017-02-22 15:28:12 +08:00
MdePkg.uni MdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth 2016-04-05 14:09:32 +08:00
MdePkgExtra.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00