]> 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>
Tue, 10 May 2022 07:47:54 +0000 (09:47 +0200)
commit11e85b8941cb6f728e37f15502f26e67231db6b6
treeb7720ffa2e4da33f445ab4dc7b6442585e67cfb2
parent3b836385679504579ee1052ed4b4ef1d9f49fa13
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/17974)
crypto/err/err.c