[v1, 10/10] examples/fips_validation: add extra space in JSON buffer
Gowrishankar Muthukrishnan
gmuthukrishn at marvell.com
Mon Feb 6 15:46:02 CET 2023
Current test buffer to copy input data of maximum possible length
did not account NULL character, due to which a last input character
is always ignored and it causes tests like RSA SIGVER for modulo
of 4096 bits to fail. This patch fixes it.
Fixes: 0b65d54f3a4 ("examples/fips_validation: fix JSON buffer size")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
---
examples/fips_validation/fips_validation.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index c4988053c1..abc1d64742 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -247,7 +247,7 @@ struct ecdsa_interim_data {
* Esp, in asym op, modulo bits decide char buffer size.
* max = (modulo / 4)
*/
-#define FIPS_TEST_JSON_BUF_LEN (4096 / 4)
+#define FIPS_TEST_JSON_BUF_LEN ((4096 / 4) + 1)
struct fips_test_json_info {
/* Information used for reading from json */
--
2.25.1
More information about the dev
mailing list