MdePkg DevicePathLib: Validate before touch input buffer.
authorEric Dong <eric.dong@intel.com>
Thu, 27 Oct 2016 03:08:37 +0000 (11:08 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 9 Nov 2016 09:49:15 +0000 (17:49 +0800)
commitc0cba3d5ddec83e2bf09deb01a25140a71f8b7e6
tree0b3f5535b200b046583ae97bade051d6d75f6a89
parent1420143f014a4c14bd7cb430aaacd6b2c4bc8043
MdePkg DevicePathLib: Validate before touch input buffer.

Current code not validate the input buffer before touch.
it may touch the buffer outside the validate scope. This
patch validate the input size big enough to touch the
first node.

Cc: Ruiyu NI <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c