diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-22 12:33:32 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-24 09:12:43 +1000 |
commit | 51d1991ecd5256aa14a41167a9ac6510e8bd7e93 (patch) | |
tree | 29a41232c7c778ca68ffa722d1c58f751efc086e /test | |
parent | 9ba18520ffaa8109eb63b46ac350c85302d9d05d (diff) |
test: fix coverity 1454812: improper use of negative value
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14638)
Diffstat (limited to 'test')
-rw-r--r-- | test/clienthellotest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 6d7fb49965..04ff4184ae 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -185,8 +185,8 @@ static int test_client_hello(int currtest) goto end; } - len = BIO_get_mem_data(wbio, (char **)&data); - if (!TEST_true(PACKET_buf_init(&pkt, data, len)) + if (!TEST_long_ge(len = BIO_get_mem_data(wbio, (char **)&data), 0) + || !TEST_true(PACKET_buf_init(&pkt, data, len)) /* Skip the record header */ || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH)) goto end; |