From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 72E1C1B76E for ; Wed, 31 Jan 2018 15:19:39 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 06:19:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="26204412" Received: from silpixa00391537.ir.intel.com (HELO silpixa00391537.ger.corp.intel.com) ([10.237.222.189]) by fmsmga004.fm.intel.com with ESMTP; 31 Jan 2018 06:19:37 -0800 From: Amr Mokhtar To: dev@dpdk.org Cc: Amr Mokhtar Date: Wed, 31 Jan 2018 14:19:34 +0000 Message-Id: <1517408374-131055-1-git-send-email-amr.mokhtar@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] examples/bbdev: fix out-of-bounds access X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 14:19:39 -0000 eth_address was improperly accessed in bbdev example app, this patch removes the use of port_id, it is irrelevant here. Coverity issue: 257021 Fixes: 1ffee690eaa1 ("examples/bbdev: add sample app") Signed-off-by: Amr Mokhtar --- examples/bbdev_app/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 2e5bd8c..a2835a4 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -282,12 +282,12 @@ print_mac(unsigned int portid, struct ether_addr *bbdev_ports_eth_address) { printf("Port %u, MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n\n", (unsigned int) portid, - bbdev_ports_eth_address[portid].addr_bytes[0], - bbdev_ports_eth_address[portid].addr_bytes[1], - bbdev_ports_eth_address[portid].addr_bytes[2], - bbdev_ports_eth_address[portid].addr_bytes[3], - bbdev_ports_eth_address[portid].addr_bytes[4], - bbdev_ports_eth_address[portid].addr_bytes[5]); + bbdev_ports_eth_address->addr_bytes[0], + bbdev_ports_eth_address->addr_bytes[1], + bbdev_ports_eth_address->addr_bytes[2], + bbdev_ports_eth_address->addr_bytes[3], + bbdev_ports_eth_address->addr_bytes[4], + bbdev_ports_eth_address->addr_bytes[5]); } static inline void -- 2.7.4