[v2] example/fips_validation: handle empty payload
Checks
Commit Message
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@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
v2:
- commit message corrections.
---
examples/fips_validation/fips_validation.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Sent: Tuesday, June 28, 2022 2:11 PM
> To: dev@dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Dooley, Brian
> <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 v2] example/fips_validation: handle empty payload
>
> 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@dpdk.org
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> ---
> v2:
> - commit message corrections.
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> > Subject: [PATCH v2] example/fips_validation: handle empty payload
> >
> > 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@dpdk.org
> >
> > Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> > ---
> > v2:
> > - commit message corrections.
>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Applied to dpdk-next-crypto
Thanks.
@@ -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;