From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: harry.van.haaren@intel.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH] event/octeontx: fix snprintf mempool name overflow
Date: Mon, 23 Apr 2018 19:09:33 +0530 [thread overview]
Message-ID: <20180423133933.31334-1-pbhagavatula@caviumnetworks.com> (raw)
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
next reply other threads:[~2018-04-23 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 13:39 Pavan Nikhilesh [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423133933.31334-1-pbhagavatula@caviumnetworks.com \
--to=pbhagavatula@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).