From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>
Cc: Fan Zhang <roy.fan.zhang@intel.com>,
Brian Dooley <brian.dooley@intel.com>,
Anoob Joseph <anoobj@marvell.com>,
"Archana Muniganti" <marchana@marvell.com>,
Jerin Jacob <jerinj@marvell.com>,
Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
<stable@dpdk.org>
Subject: [PATCH v1] example/fips_validation: handle empty payload
Date: Tue, 28 Jun 2022 13:28:30 +0530 [thread overview]
Message-ID: <0557079b1aa7fd8450adb2e28b03817016be4cad.1656402940.git.gmuthukrishn@marvell.com> (raw)
Allocate atleast onebyte to handle empty payload in a test vector
when defined.
Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
examples/fips_validation/fips_validation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 94e31abf83..324abccb14 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -630,7 +630,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
val->val = NULL;
}
- val->val = rte_zmalloc(NULL, len, 0);
+ val->val = rte_zmalloc(NULL, len + 1, 0);
if (!val->val)
return -ENOMEM;
--
2.25.1
next reply other threads:[~2022-06-28 7:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 7:58 Gowrishankar Muthukrishnan [this message]
2022-06-28 13:11 ` [PATCH v2] " Gowrishankar Muthukrishnan
2022-06-29 8:07 ` Zhang, Roy Fan
2022-06-30 4:24 ` Akhil Goyal
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=0557079b1aa7fd8450adb2e28b03817016be4cad.1656402940.git.gmuthukrishn@marvell.com \
--to=gmuthukrishn@marvell.com \
--cc=anoobj@marvell.com \
--cc=brian.dooley@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=marchana@marvell.com \
--cc=roy.fan.zhang@intel.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 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).