DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] event/octeontx: fix snprintf mempool name overflow
@ 2018-04-23 13:39 Pavan Nikhilesh
  2018-04-23 14:21 ` Van Haaren, Harry
  0 siblings, 1 reply; 5+ messages in thread
From: Pavan Nikhilesh @ 2018-04-23 13:39 UTC (permalink / raw)
  To: harry.van.haaren; +Cc: dev, Pavan Nikhilesh

Bugzilla-ID: 28
Fixes: f874c1eb1519 ("event/octeontx: create and free timer adapter")

Reported-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/event/octeontx/timvf_evdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 22f534be6..c4fbd2d86 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -294,7 +294,8 @@ timvf_ring_create(struct rte_event_timer_adapter *adptr)
 	if (timr->bkt == NULL)
 		goto mem_err;
 
-	snprintf(pool_name, 30, "timvf_chunk_pool%d", timr->tim_ring_id);
+	snprintf(pool_name, sizeof(pool_name), "timvf_chunk_pool%d",
+			timr->tim_ring_id);
 	timr->chunk_pool = (void *)rte_mempool_create_empty(pool_name,
 			timr->nb_chunks, TIM_CHUNK_SIZE, 0, 0, rte_socket_id(),
 			mp_flags);
-- 
2.17.0

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

end of thread, other threads:[~2018-04-25 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 13:39 [dpdk-dev] [PATCH] event/octeontx: fix snprintf mempool name overflow Pavan Nikhilesh
2018-04-23 14:21 ` Van Haaren, Harry
2018-04-25 12:54   ` Van Haaren, Harry
2018-04-25 14:55     ` Thomas Monjalon
2018-04-25 15:01       ` Van Haaren, Harry

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).