]> git.ipfire.org Git - thirdparty/openssl.git/commit
err: fix crash in ERR_load_strings() when configured with no-err
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Mon, 28 Mar 2022 09:47:55 +0000 (11:47 +0200)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Sat, 9 Apr 2022 21:06:27 +0000 (23:06 +0200)
commitfdc4646d5eb03e9e3d14ed496bf655671240193a
treea2e24dcec8262a2990ac7ab4344cff4a50464072
parent93ac3b8dd1cc49b27c402278cbe73a1c4ac91f9b
err: fix crash in ERR_load_strings() when configured with no-err

This commit removes the entire initialization and cleanup of the
error string hash table (`int_error_hash`) if `no-err` is configured.
The only operative function remaining is `ERR_get_next_error_library()`.
That is the reason why the `err_string_lock` and hence the
`do_err_strings_init()` function can't be removed entirely.

Fixes #17971

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17975)
crypto/err/err.c