]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFw: Exit with error when header lookup fails
authorMichael LeMay <michael.lemay@intel.com>
Fri, 29 Jan 2016 03:23:21 +0000 (11:23 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 17 Feb 2016 05:17:26 +0000 (13:17 +0800)
This patch revises GetPhdrByIndex and GetShdrByIndex to cause GenFw to
exit with an error message when a section header lookup fails.  The
current behavior of those functions in such circumstances is to return
NULL, which can cause GenFw to subsequently fault when it attempts to
dereference the null pointer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>

No differences found