From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 204B520347118 for ; Mon, 20 Nov 2017 00:30:20 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2017 00:34:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,425,1505804400"; d="scan'208";a="3813188" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 20 Nov 2017 00:34:34 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Nov 2017 00:34:34 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Nov 2017 00:34:33 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Mon, 20 Nov 2017 16:34:32 +0800 From: "Wu, Hao A" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" Thread-Topic: [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error Thread-Index: AQHTYdHI63mel8QyCk6bR4WFP38by6Mc8R+g Date: Mon, 20 Nov 2017 08:34:31 +0000 Message-ID: References: <1511163169-9172-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1511163169-9172-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 08:30:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: Zeng, Star > Sent: Monday, November 20, 2017 3:33 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star; Wu, Hao A; Yao, Jiewen > Subject: [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to > return error >=20 > Cc: Hao Wu > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c > b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c > index 606a53db1da1..6b19362699b1 100644 > --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c > +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c > @@ -134,7 +134,7 @@ EhcInitSched ( > &Map > ); >=20 > - if (EFI_ERROR (Status)) { > + if (EFI_ERROR (Status) || (Buf =3D=3D NULL)) { > return EFI_OUT_OF_RESOURCES; > } >=20 > -- > 2.7.0.windows.1