diff options
author | Pauli <paul.dale@oracle.com> | 2019-03-29 18:42:37 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-03-29 20:52:01 +1000 |
commit | 72962d025f875ac35114ac090b878ee18b246144 (patch) | |
tree | 4dd31617b30ff500a4d935d3fd2f5946583c4f9d /test/clienthellotest.c | |
parent | 6fc1e6246f9b29334fd6dcb5b832e75cce7a2ecd (diff) |
Correctly initialise PACKET to zero in the tests to avoid possible problems
with padding bytes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8611)
Diffstat (limited to 'test/clienthellotest.c')
-rw-r--r-- | test/clienthellotest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 7fdb5bc6fe..0afad6dbd6 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -58,7 +58,7 @@ static int test_client_hello(int currtest) BIO *wbio; long len; unsigned char *data; - PACKET pkt = {0}, pkt2 = {0}, pkt3 = {0}; + PACKET pkt, pkt2, pkt3; char *dummytick = "Hello World!"; unsigned int type = 0; int testresult = 0; @@ -71,6 +71,10 @@ static int test_client_hello(int currtest) return 1; #endif + memset(&pkt, 0, sizeof(pkt)); + memset(&pkt2, 0, sizeof(pkt2)); + memset(&pkt3, 0, sizeof(pkt3)); + /* * For each test set up an SSL_CTX and SSL and see what ClientHello gets * produced when we try to connect |