From 016f7357d2e2902c41921cfea66367133e72fb0d Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 26 Oct 2017 16:19:56 -0600 Subject: [PATCH] increase test buffer size to account for edge case --- tests/api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/api.c b/tests/api.c index c20dcf02b..2d3320a56 100644 --- a/tests/api.c +++ b/tests/api.c @@ -7791,7 +7791,9 @@ static int test_wc_RsaKeyToDer (void) WC_RNG rng; byte* der; - der = (byte*)XMALLOC(610, NULL, DYNAMIC_TYPE_TMP_BUFFER); + /* (2 x 128) + 2 (possible leading 00) + (5 x 64) + 5 (possible leading 00) + + 3 (e) + 8 (ASN tag) + 10 (ASN length) + 4 seqSz + 3 version */ + der = (byte*)XMALLOC(611, NULL, DYNAMIC_TYPE_TMP_BUFFER); if (der == NULL) { ret = SSL_FATAL_ERROR; }