From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 1F1B48184D for ; Mon, 26 Dec 2016 01:45:04 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 26 Dec 2016 01:45:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,404,1477983600"; d="scan'208";a="206852991" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 26 Dec 2016 01:45:03 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 26 Dec 2016 01:45:02 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 26 Dec 2016 01:45:02 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Mon, 26 Dec 2016 17:45:00 +0800 From: "Fu, Siyuan" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Wu, Hao A" , "Wu, Jiaxin" Thread-Topic: [edk2] [Patch] NetworkPkg/HttpDxe: Fix the potential NULL dereference Thread-Index: AQHSXMq9vAUN1G4llUK61Oks5LWZcKEZ/89g Date: Mon, 26 Dec 2016 09:44:58 +0000 Message-ID: References: <1482462888-305872-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1482462888-305872-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzgxNWNhYTgtODhhNC00N2UyLTk1MzYtYmM0MTA1YzczMzdlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkVpUnQyamV0MnlGMytUMkRNQ3VHVUIrS3ptaDM4WmtFS2M4MlZQYXI5M289In0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] NetworkPkg/HttpDxe: Fix the potential NULL dereference X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2016 09:45:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 UmV2aWV3ZWQtYnk6IEZ1IFNpeXVhbiA8c2l5dWFuLmZ1QGludGVsLmNvbT4NCg0KDQotLS0tLU9y aWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogZWRrMi1kZXZlbCBbbWFpbHRvOmVkazItZGV2ZWwt Ym91bmNlc0BsaXN0cy4wMS5vcmddIE9uIEJlaGFsZiBPZiBKaWF4aW4gV3UNClNlbnQ6IDIwMTbE 6jEy1MIyM8jVIDExOjE1DQpUbzogZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCkNjOiBZZSwgVGlu ZyA8dGluZy55ZUBpbnRlbC5jb20+OyBXdSwgSGFvIEEgPGhhby5hLnd1QGludGVsLmNvbT47IEZ1 LCBTaXl1YW4gPHNpeXVh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DQ3OGE5ZTAuLmM5 ZTY5ODggMTAwNjQ0DQotLS0gYS9OZXR3b3JrUGtnL0h0dHBEeGUvSHR0cHNTdXBwb3J0LmMNCisr KyBiL05ldHdvcmtQa2cvSHR0cER4ZS9IdHRwc1N1cHBvcnQuYw0KQEAgLTM5OSwzNyArMzk5LDQx IEBAIFRsc0NvbmZpZ0NlcnRpZmljYXRlICgNCiAgICAgICAgICAgICAgICAgICAgTlVMTCwNCiAg ICAgICAgICAgICAgICAgICAgJkNBQ2VydFNpemUsDQogICAgICAgICAgICAgICAgICAgIE5VTEwN CiAgICAgICAgICAgICAgICAgICAgKTsNCiANCi0gIGlmIChTdGF0dXMgPT0gRUZJX0JVRkZFUl9U T09fU01BTEwpIHsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykgJiYgU3RhdHVzICE9IEVGSV9C VUZGRVJfVE9PX1NNQUxMKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICAvLw0K KyAgLy8gQWxsb2NhdGUgYnVmZmVyIGFuZCByZWFkIHRoZSBjb25maWcgdmFyaWFibGUuDQorICAv Lw0KKyAgQ0FDZXJ0ID0gQWxsb2NhdGVQb29sIChDQUNlcnRTaXplKTsNCisgIGlmIChDQUNlcnQg PT0gTlVMTCkgew0KKyAgICByZXR1cm4gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICB9DQorDQor ICBTdGF0dXMgPSBnUlQtPkdldFZhcmlhYmxlICgNCisgICAgICAgICAgICAgICAgICBFRklfVExT X0NBX0NFUlRJRklDQVRFX1ZBUklBQkxFLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpVGxzQ2FD ZXJ0aWZpY2F0ZUd1aWQsDQorICAgICAgICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAg ICAgICAmQ0FDZXJ0U2l6ZSwNCisgICAgICAgICAgICAgICAgICBDQUNlcnQNCisgICAgICAgICAg ICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3Rh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