]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Remove OpenSSL compat code that misuses the API 1621/head
authorTheo Buehler <tb@openbsd.org>
Fri, 19 Nov 2021 17:55:29 +0000 (18:55 +0100)
committerTheo Buehler <tb@openbsd.org>
Sat, 20 Nov 2021 08:09:11 +0000 (09:09 +0100)
commitcdf1d39e4e18c933a22ec516fe8c230deadfa9bc
treea73baf12862e599164e01c7deac391a2d936b389
parentede459d2ebb879f5eedb6f7abea203be0b334230
Remove OpenSSL compat code that misuses the API

Immediately after EVP_CIPHER_CTX_new() neither EVP_CIPHER_CTX_init()
nor EVP_CIHPER_CTX_reset() should be called: the purpose of the init
function is to initialize a context on the stack while reset clears
a used context for reuse. Neither situation is the case here.

Removing the code also fixes a potential NULL dereference because an
error of reset is not signaled to the caller. Fortunately reset doesn't
currently fail in this situation in current OpenSSL and LibreSSL.
libarchive/archive_cryptor.c