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)
This commit is contained in:
parent
f7feb2d937
commit
7fb9163586
|
@ -894,7 +894,8 @@ int generate_stateless_cookie_callback(SSL *ssl, unsigned char *cookie,
|
|||
buffer = app_malloc(length, "cookie generate buffer");
|
||||
|
||||
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,
|
||||
cookie_secret, COOKIE_SECRET_LENGTH, buffer, length,
|
||||
|
|
Loading…
Reference in New Issue