crypto: fix zero byte allocation assertion failure
When an empty string was passed, malloc might have returned a nullptr depending on the platform, causing an assertion failure. This change makes private key parsing behave as public key parsing does, causing a BIO error instead that can be caught in JS. Fixes: https://github.com/nodejs/node/issues/25247 PR-URL: https://github.com/nodejs/node/pull/25248 Reviewed-By:Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
parent
54fa59c8
Please register or sign in to comment