Branch: refs/heads/master Home: https://github.com/openssl/openssl Commit: 608aca8ed2becccfe9c238846834ea2b162fc98b https://github.com/openssl/openssl/commit/608aca8ed2becccfe9c238846834ea2b162fc98b Author: Milan Broz <gmazyl...@gmail.com> Date: 2022-11-10 (Thu, 10 Nov 2022)
Changed paths: M crypto/pem/pem_pkey.c Log Message: ----------- pem: fix a memory leak in PEM_write_bio_PrivateKey_traditional The copy of PKEY should be released on the error path. Easily reproduced with "ED448" context. Signed-off-by: Milan Broz <gmazyl...@gmail.com> Reviewed-by: Dmitry Belyavskiy <beld...@gmail.com> Reviewed-by: Tomas Mraz <to...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19536) Commit: 373d90128042cb0409e347827d80b50a99d3965a https://github.com/openssl/openssl/commit/373d90128042cb0409e347827d80b50a99d3965a Author: Milan Broz <gmazyl...@gmail.com> Date: 2022-11-10 (Thu, 10 Nov 2022) Changed paths: M crypto/pem/pem_pkey.c M test/evp_pkey_provided_test.c Log Message: ----------- pem: avoid segfault if PKEY is NULL in PEM_write_bio_PrivateKey Make the code more robust and correctly handle EVP_PKEY set to NULL instead of dereferencing null pointer. Signed-off-by: Milan Broz <gmazyl...@gmail.com> Reviewed-by: Dmitry Belyavskiy <beld...@gmail.com> Reviewed-by: Tomas Mraz <to...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19536) Compare: https://github.com/openssl/openssl/compare/4378e3cd2a4d...373d90128042