diff options
author | Mike Turner <miketur@microsoft.com> | 2018-12-11 14:14:10 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-01-31 20:19:21 +0800 |
commit | fd02394228ee1dc2378cccfde6098c461f96dd42 (patch) | |
tree | 2642398cf946d0a8090f843ba3bc640e73480f61 /MdePkg/Include/Library | |
parent | 3d086fed730e7958d1d9486749a72f0da1c08e91 (diff) | |
download | edk2-fd02394228ee1dc2378cccfde6098c461f96dd42.tar.gz edk2-fd02394228ee1dc2378cccfde6098c461f96dd42.tar.bz2 edk2-fd02394228ee1dc2378cccfde6098c461f96dd42.zip |
MdePkg/UefiDevicePathLib: Add a checking step
Add a checking step in DevicePathUtilities.c to verify DevicePath.
https://bugzilla.tianocore.org/show_bug.cgi?id=1372
v2: Remove ASSERT() and the redundant checking step. Update related
description.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdePkg/Include/Library')
-rw-r--r-- | MdePkg/Include/Library/DevicePathLib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MdePkg/Include/Library/DevicePathLib.h b/MdePkg/Include/Library/DevicePathLib.h index 959299704a..670e7b0424 100644 --- a/MdePkg/Include/Library/DevicePathLib.h +++ b/MdePkg/Include/Library/DevicePathLib.h @@ -22,12 +22,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Determine whether a given device path is valid.
- If DevicePath is NULL, then ASSERT().
@param DevicePath A pointer to a device path data structure.
@param MaxSize The maximum size of the device path data structure.
@retval TRUE DevicePath is valid.
+ @retval FALSE DevicePath is NULL.
+ @retval FALSE Maxsize is less than sizeof(EFI_DEVICE_PATH_PROTOCOL).
@retval FALSE The length of any node node in the DevicePath is less
than sizeof (EFI_DEVICE_PATH_PROTOCOL).
@retval FALSE If MaxSize is not zero, the size of the DevicePath
|