DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/bbdev: fix out-of-bounds access
@ 2018-01-31 14:19 Amr Mokhtar
  2018-01-31 17:27 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Amr Mokhtar @ 2018-01-31 14:19 UTC (permalink / raw)
  To: dev; +Cc: Amr Mokhtar

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 <amr.mokhtar@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/bbdev: fix out-of-bounds access
  2018-01-31 14:19 [dpdk-dev] [PATCH] examples/bbdev: fix out-of-bounds access Amr Mokhtar
@ 2018-01-31 17:27 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-01-31 17:27 UTC (permalink / raw)
  To: Amr Mokhtar; +Cc: dev

31/01/2018 15:19, Amr Mokhtar:
> 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 <amr.mokhtar@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-31 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 14:19 [dpdk-dev] [PATCH] examples/bbdev: fix out-of-bounds access Amr Mokhtar
2018-01-31 17:27 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).