Fixes in test and example code

This commit is contained in:
Eric Blankenhorn
2019-12-17 15:56:40 -06:00
parent af5c98a6a8
commit 774a758f59
3 changed files with 12 additions and 9 deletions

View File

@ -1279,8 +1279,8 @@ int bench_tls(void* args)
stats_t cli_comb, srv_comb;
int i;
char *cipher, *next_cipher, *ciphers = NULL;
int argc = ((func_args*)args)->argc;
char** argv = ((func_args*)args)->argv;
int argc = 0;
char** argv = NULL;
int ch;
/* Vars configured by command line arguments */
@ -1303,8 +1303,11 @@ int bench_tls(void* args)
int listenFd = -1;
#endif
if (args)
if (args != NULL) {
argc = ((func_args*)args)->argc;
argv = ((func_args*)args)->argv;
((func_args*)args)->return_code = -1; /* error state */
}
/* Initialize wolfSSL */
wolfSSL_Init();

View File

@ -231,7 +231,7 @@ static void ShowVersions(void)
#ifdef WOLFSSL_TLS13
static void SetKeyShare(WOLFSSL* ssl, int onlyKeyShare, int useX25519)
{
int groups[3];
int groups[3] = {0};
int count = 0;
(void)useX25519;