From nobody Sun May 5 04:20:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15090710337219.681350144952944; Thu, 26 Oct 2017 19:23:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A4C2D2034A880; Thu, 26 Oct 2017 19:20:05 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 EE0B42034A875 for ; Thu, 26 Oct 2017 19:20:03 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2017 19:23:50 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.184]) by orsmga004.jf.intel.com with ESMTP; 26 Oct 2017 19:23:49 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,303,1505804400"; d="scan'208";a="142720420" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Fri, 27 Oct 2017 10:23:44 +0800 Message-Id: <1509071025-38548-2-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1509071025-38548-1-git-send-email-jiaxin.wu@intel.com> References: <1509071025-38548-1-git-send-email-jiaxin.wu@intel.com> Subject: [edk2] [Patch 1/2] NetworkPkg/HttpBootDxe: Add check to avoid use NULL pointer 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: , Cc: Wu Hao A , Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Wu Hao A Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Hao Wu --- NetworkPkg/HttpBootDxe/HttpBootDxe.c | 50 +++++++++++++++++++-------------= ---- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.c b/NetworkPkg/HttpBootDxe/= HttpBootDxe.c index b1f9042..8a61f51 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.c +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.c @@ -613,23 +613,25 @@ HttpBootIp4DxeDriverBindingStart ( } =20 return EFI_SUCCESS; =20 ON_ERROR: - if (FirstStart) { - gBS->UninstallProtocolInterface ( - ControllerHandle, - &gEfiCallerIdGuid, - &Private->Id - ); - } - =20 - HttpBootDestroyIp4Children (This, Private); - HttpBootConfigFormUnload (Private); + if (Private !=3D NULL) { + if (FirstStart) { + gBS->UninstallProtocolInterface ( + ControllerHandle, + &gEfiCallerIdGuid, + &Private->Id + ); + } + =20 + HttpBootDestroyIp4Children (This, Private); + HttpBootConfigFormUnload (Private); =20 - if (FirstStart && Private !=3D NULL) { - FreePool (Private); + if (FirstStart) { + FreePool (Private); + } } =20 return Status; } =20 @@ -1142,23 +1144,25 @@ HttpBootIp6DxeDriverBindingStart ( } =20 return EFI_SUCCESS; =20 ON_ERROR: - if (FirstStart) { - gBS->UninstallProtocolInterface ( - ControllerHandle, - &gEfiCallerIdGuid, - &Private->Id - ); - } + if (Private !=3D NULL) { + if (FirstStart) { + gBS->UninstallProtocolInterface ( + ControllerHandle, + &gEfiCallerIdGuid, + &Private->Id + ); + } =20 - HttpBootDestroyIp6Children(This, Private); - HttpBootConfigFormUnload (Private); + HttpBootDestroyIp6Children(This, Private); + HttpBootConfigFormUnload (Private); =20 - if (FirstStart && Private !=3D NULL) { - FreePool (Private); + if (FirstStart) { + FreePool (Private); + } } =20 return Status; } =20 --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 04:20:51 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1509071036064378.2694740974331; Thu, 26 Oct 2017 19:23:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E305A2034A883; Thu, 26 Oct 2017 19:20:07 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 AE5692034A882 for ; Thu, 26 Oct 2017 19:20:05 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2017 19:23:52 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.184]) by orsmga004.jf.intel.com with ESMTP; 26 Oct 2017 19:23:51 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,303,1505804400"; d="scan'208";a="142720427" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Fri, 27 Oct 2017 10:23:45 +0800 Message-Id: <1509071025-38548-3-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1509071025-38548-1-git-send-email-jiaxin.wu@intel.com> References: <1509071025-38548-1-git-send-email-jiaxin.wu@intel.com> Subject: [edk2] [Patch 2/2] NetworkPkg/IScsiDxe: Add check to avoid use NULL pointer 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: , Cc: Wu Hao A , Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Wu Hao A Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Hao Wu --- NetworkPkg/IScsiDxe/IScsiConfig.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiC= onfig.c index 3382982..62df367 100644 --- a/NetworkPkg/IScsiDxe/IScsiConfig.c +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c @@ -3594,10 +3594,14 @@ IScsiFormCallback ( =20 case KEY_IP_MODE: switch (Value->u8) { case IP_MODE_IP6: NicInfo =3D IScsiGetNicInfoByIndex (Private->Current->NicIndex);=20 + if(NicInfo =3D=3D NULL) { + break; + } + if(!NicInfo->Ipv6Available) { =09 // // Current NIC doesn't Support IPv6, hence use IPv4. =20 // =20 IfrNvData->IpMode =3D IP_MODE_IP4; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel