* [PATCH] examples/l2fwd-crypto: fix potential overflow
@ 2022-02-21 18:06 Brian Dooley
2022-02-23 10:52 ` [EXT] " Akhil Goyal
0 siblings, 1 reply; 2+ messages in thread
From: Brian Dooley @ 2022-02-21 18:06 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, declan.doherty, stable, Akhil Goyal, Fan Zhang,
Sergio Gonzalez Monroy
Coverity flags an issue with 32-bit value. If max ethports value is
configured with a value larger than 32 there will be an issue.
Coverity issue: 375863 Unintentional integer overflow
Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")
Cc: declan.doherty@intel.com
Cc: stable@dpdk.org
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
examples/l2fwd-crypto/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4d9f8861af..bbdb263143 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2719,7 +2719,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
last_portid = portid;
}
- l2fwd_enabled_port_mask |= (1 << portid);
+ l2fwd_enabled_port_mask |= (1ULL << portid);
enabled_portcount++;
}
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [EXT] [PATCH] examples/l2fwd-crypto: fix potential overflow
2022-02-21 18:06 [PATCH] examples/l2fwd-crypto: fix potential overflow Brian Dooley
@ 2022-02-23 10:52 ` Akhil Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-02-23 10:52 UTC (permalink / raw)
To: Brian Dooley, dev
Cc: declan.doherty, stable, Fan Zhang, Sergio Gonzalez Monroy
> Coverity flags an issue with 32-bit value. If max ethports value is
> configured with a value larger than 32 there will be an issue.
> Coverity issue: 375863 Unintentional integer overflow
>
> Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")
> Cc: declan.doherty@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Brian Dooley <brian.dooley@intel.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-23 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 18:06 [PATCH] examples/l2fwd-crypto: fix potential overflow Brian Dooley
2022-02-23 10:52 ` [EXT] " Akhil Goyal
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).