mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
test: fix coverity 1451534: improper use of negative value
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14638)
This commit is contained in:
parent
69fb52e028
commit
66325793cc
@ -52,8 +52,8 @@ static int get_sni_from_client_hello(BIO *bio, char **sni)
|
||||
memset(&pkt4, 0, sizeof(pkt4));
|
||||
memset(&pkt5, 0, sizeof(pkt5));
|
||||
|
||||
len = BIO_get_mem_data(bio, (char **)&data);
|
||||
if (!TEST_true(PACKET_buf_init(&pkt, data, len))
|
||||
if (!TEST_long_ge(len = BIO_get_mem_data(bio, (char **)&data), 0)
|
||||
|| !TEST_true(PACKET_buf_init(&pkt, data, len))
|
||||
/* Skip the record header */
|
||||
|| !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH)
|
||||
/* Skip the handshake message header */
|
||||
|
Loading…
Reference in New Issue
Block a user