mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-15 19:09:42 +00:00
test: fix coverity 1371689 & 1371690: improper use of negative values
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14638)
This commit is contained in:
parent
5a14bd153a
commit
fe10fa7521
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user