mirror of https://github.com/openssl/openssl.git
Check return code of BIO_ADDR_rawaddress
Fixes coverity issue: https://scan5.scan.coverity.com/#/project-view/64471/10222?selectedIssue=1666584
Thank you for the report!
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28751)
(cherry picked from commit 7fb9163586
)
This commit is contained in:
parent
49efe65615
commit
80c8cad360
|
@ -873,7 +873,8 @@ int generate_stateless_cookie_callback(SSL *ssl, unsigned char *cookie,
|
||||||
buffer = app_malloc(length, "cookie generate buffer");
|
buffer = app_malloc(length, "cookie generate buffer");
|
||||||
|
|
||||||
memcpy(buffer, &port, sizeof(port));
|
memcpy(buffer, &port, sizeof(port));
|
||||||
BIO_ADDR_rawaddress(peer, buffer + sizeof(port), NULL);
|
if (!BIO_ADDR_rawaddress(peer, buffer + sizeof(port), NULL))
|
||||||
|
goto end;
|
||||||
|
|
||||||
if (EVP_Q_mac(NULL, "HMAC", NULL, "SHA1", NULL,
|
if (EVP_Q_mac(NULL, "HMAC", NULL, "SHA1", NULL,
|
||||||
cookie_secret, COOKIE_SECRET_LENGTH, buffer, length,
|
cookie_secret, COOKIE_SECRET_LENGTH, buffer, length,
|
||||||
|
|
Loading…
Reference in New Issue