From: Muhammad Bilal <m.bilal@emumba.com>
To: hemant.agrawal@nxp.com, olivier.matz@6wind.com
Cc: dev@dpdk.org, Muhammad Bilal <m.bilal@emumba.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] putting null checks on ops_name
Date: Mon, 6 Apr 2020 16:30:20 +0500 [thread overview]
Message-ID: <20200406113020.8074-1-m.bilal@emumba.com> (raw)
Bugzilla ID: 353
Cc: dev@dpdk.org
Cc: stable@dpdk.org
Cc: hemant.agrawal@nxp.com
Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
---
lib/librte_mbuf/rte_mbuf_pool_ops.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.c b/lib/librte_mbuf/rte_mbuf_pool_ops.c
index 5722976fe..c3ddfc0bd 100644
--- a/lib/librte_mbuf/rte_mbuf_pool_ops.c
+++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c
@@ -13,7 +13,8 @@ int
rte_mbuf_set_platform_mempool_ops(const char *ops_name)
{
const struct rte_memzone *mz;
-
+ if (strlen(ops_name) == 0)
+ return -1;
if (strlen(ops_name) >= RTE_MEMPOOL_OPS_NAMESIZE)
return -ENAMETOOLONG;
@@ -50,7 +51,8 @@ int
rte_mbuf_set_user_mempool_ops(const char *ops_name)
{
const struct rte_memzone *mz;
-
+ if (strlen(ops_name) == 0)
+ return -1;
if (strlen(ops_name) >= RTE_MEMPOOL_OPS_NAMESIZE)
return -ENAMETOOLONG;
--
2.17.1
next reply other threads:[~2020-04-06 11:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 11:30 Muhammad Bilal [this message]
2020-04-06 15:20 ` [dpdk-dev] [PATCH] putting null checks on ops_name Stephen Hemminger
2020-04-07 7:56 ` [dpdk-dev] [PATCH v2] " Muhammad Bilal
2020-04-07 10:16 ` Hemant Agrawal
2020-04-25 20:59 ` Thomas Monjalon
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=20200406113020.8074-1-m.bilal@emumba.com \
--to=m.bilal@emumba.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.