]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device...
authorJian J Wang <jian.j.wang@intel.com>
Thu, 14 Feb 2019 09:57:47 +0000 (17:57 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Thu, 21 Feb 2019 12:54:31 +0000 (20:54 +0800)
commit7c0e8053f220ddf463677ec70fe89fda498249ba
tree8d5906d397765b998a696f03fd138d94c8623602
parent2f7a96d6ec13b292d6f31295f3195913921173e1
MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497

Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c