From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: michael.d.kinney@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Thu, 15 Aug 2019 19:14:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 19:14:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,391,1559545200"; d="scan'208";a="201406990" Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.98.74]) by fmsmga004.fm.intel.com with ESMTP; 15 Aug 2019 19:14:42 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Jordan Justen , Ray Ni , Andrew Fish Subject: [Patch V4 07/10] EmulatorPkg/Unix/Host: Fix BerkeleyPacketFilter.c issues Date: Thu, 15 Aug 2019 19:14:34 -0700 Message-Id: <20190816021437.7516-8-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190816021437.7516-1-michael.d.kinney@intel.com> References: <20190816021437.7516-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit * Fix uninitialized Private->ReadBuffer. * Remove old debug code that generates an exception. Cc: Jordan Justen Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Andrew Fish --- EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c index 8d0eb0d197..3013bbc86b 100644 --- a/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c +++ b/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c @@ -216,6 +216,7 @@ EmuSnpStart ( } Status = EFI_SUCCESS; + Private->ReadBuffer = NULL; if (Private->BpfFd == 0) { Status = OpenBpfFileDescriptor (Private, &Private->BpfFd); if (EFI_ERROR (Status)) { @@ -766,10 +767,6 @@ EmuSnpGetStatus ( Private = EMU_SNP_PRIVATE_DATA_FROM_THIS (This); - if (TxBuf != NULL) { - *((UINT8 **)TxBuf) = (UINT8 *)1; - } - if ( InterruptStatus != NULL ) { *InterruptStatus = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; } -- 2.21.0.windows.1