BaseTools/VfrCompile: Avoid possible NULL pointer dereference
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -665,7 +665,7 @@ CVfrVarDataTypeDB::GetTypeField (
|
||||
{
|
||||
SVfrDataField *pField = NULL;
|
||||
|
||||
if ((FName == NULL) && (Type == NULL)) {
|
||||
if ((FName == NULL) || (Type == NULL)) {
|
||||
return VFR_RETURN_FATAL_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user