Removed comment and changed len equal to variables instead of numbers

This commit is contained in:
Ethan Looney
2020-08-03 13:31:11 -07:00
parent b627610cde
commit 7f381275b1

View File

@@ -33727,7 +33727,7 @@ static int test_mp_rand (void)
int ret = 0; int ret = 0;
#if defined(WC_RSA_BLINDING) && defined(WOLFSSL_PUBLIC_MP) #if defined(WC_RSA_BLINDING) && defined(WOLFSSL_PUBLIC_MP)
mp_int a; mp_int a;
int digits = 1; /*Setting equal to 0 causes a segmentation fault, line 183*/ int digits = 1;
WC_RNG rng; WC_RNG rng;
printf(testingFmt, "mp_rand()"); printf(testingFmt, "mp_rand()");
@@ -33829,14 +33829,14 @@ static int test_wc_export_int (void)
ret = 0; ret = 0;
} }
} }
len = 255; len = sizeof(buf)-1;
if (ret == 0) { if (ret == 0) {
ret = wc_export_int(&mp, buf, &len, keySz, encType); ret = wc_export_int(&mp, buf, &len, keySz, encType);
if (ret == BUFFER_E) { if (ret == BUFFER_E) {
ret = 0; ret = 0;
} }
} }
len = 256; len = sizeof(buf);
if (ret == 0) { if (ret == 0) {
ret = wc_export_int(&mp, buf, &len, keySz, WC_TYPE_HEX_STR); ret = wc_export_int(&mp, buf, &len, keySz, WC_TYPE_HEX_STR);
} }