mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
Validate the category in OSSL_trace_end()
OSSL_trace_end() should validate that the category it has been passed by the caler is valid, and return immediately if not. Fixes #17353 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17371)
This commit is contained in:
parent
0088ef48c3
commit
ee8a61e158
@ -496,6 +496,8 @@ void OSSL_trace_end(int category, BIO * channel)
|
||||
char *suffix = NULL;
|
||||
|
||||
category = ossl_trace_get_category(category);
|
||||
if (category < 0)
|
||||
return;
|
||||
suffix = trace_channels[category].suffix;
|
||||
if (channel != NULL
|
||||
&& ossl_assert(channel == current_channel)) {
|
||||
|
Loading…
Reference in New Issue
Block a user