From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.5643.1572445636099601571 for ; Wed, 30 Oct 2019 07:27:16 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: shenglei.zhang@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 07:27:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="203895357" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 30 Oct 2019 07:27:13 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Dandan Bi , Eric Dong , Liming Gao Subject: [PATCH v2 0/4] MdeModulePkg: Add check for variables and return value Date: Wed, 30 Oct 2019 22:27:06 +0800 Message-Id: <20191030142710.42756-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 The variables and return value might be NULL. So add check for them before they are used. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Eric Dong Cc: Hao A Wu Cc: Liming Gao Shenglei Zhang (4): v2: Update the checking method in 02/04. MdeModulePkg/EbcDebugger: Add check for Entry and RetEntry MdeModulePkg/HiiDatabaseDxe: Add check for StringPtr MdeModulePkg/EsrtDxe: Add check for EsrtRepository MdeModulePkg/SetupBrowserDxe: Add check for GetBufferForValue() .../Universal/EbcDxe/EbcDebugger/EdbCmdSymbol.c | 2 +- MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c | 2 +- MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c | 10 ++++++++++ MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 1 + MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) -- 2.18.0.windows.1