[PATCH v2] example/fips_validation: handle empty payload
Gowrishankar Muthukrishnan
gmuthukrishn at marvell.com
Tue Jun 28 15:11:09 CEST 2022
Allocate at least onebyte to handle empty payload in a test vector
when defined.
Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application")
Cc: stable at dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
---
v2:
- commit message corrections.
---
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
More information about the stable
mailing list