diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-22 11:49:56 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-24 09:12:43 +1000 |
commit | fe10fa75216cb0e81eeee9bced2b4d26e05bf9e7 (patch) | |
tree | 2e1bbc87da074df05d8abb3545d03aca91418152 /test/bad_dtls_test.c | |
parent | 5a14bd153a9c725c3b7b1e02920dc36052320b5b (diff) |
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14638)
Diffstat (limited to 'test/bad_dtls_test.c')
-rw-r--r-- | test/bad_dtls_test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c index 524ec52cf0..52333e860c 100644 --- a/test/bad_dtls_test.c +++ b/test/bad_dtls_test.c @@ -122,7 +122,8 @@ static int validate_client_hello(BIO *wbio) int cookie_found = 0; unsigned int u = 0; - len = BIO_get_mem_data(wbio, (char **)&data); + if ((len = BIO_get_mem_data(wbio, (char **)&data)) < 0) + return 0; if (!PACKET_buf_init(&pkt, data, len)) return 0; @@ -391,6 +392,9 @@ static int validate_ccs(BIO *wbio) unsigned int u; len = BIO_get_mem_data(wbio, (char **)&data); + if (len < 0) + return 0; + if (!PACKET_buf_init(&pkt, data, len)) return 0; |