mirror of
https://github.com/openssl/openssl.git
synced 2025-02-05 14:10:53 +08:00
list_tls_signatures(): Avoid leak with zero length builtin_sigalgs
Fixes Coverity 1616307 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25219)
This commit is contained in:
parent
8d28402ce3
commit
47645bf7c6
@ -779,10 +779,12 @@ static void list_tls_signatures(void)
|
||||
int tls_sigalg_listed = 0;
|
||||
char *builtin_sigalgs = SSL_get1_builtin_sigalgs(app_get0_libctx());
|
||||
|
||||
if (builtin_sigalgs != NULL && builtin_sigalgs[0] != 0) {
|
||||
BIO_printf(bio_out, "%s", builtin_sigalgs);
|
||||
if (builtin_sigalgs != NULL) {
|
||||
if (builtin_sigalgs[0] != 0) {
|
||||
BIO_printf(bio_out, "%s", builtin_sigalgs);
|
||||
tls_sigalg_listed = 1;
|
||||
}
|
||||
OPENSSL_free(builtin_sigalgs);
|
||||
tls_sigalg_listed = 1;
|
||||
}
|
||||
|
||||
/* As built-in providers don't have this capability, never error */
|
||||
|
Loading…
Reference in New Issue
Block a user