This function can return null, which will make the calls to BIO_meth_set_* trigger a null deref. Even after fixing this, there is an issue with the `BIOPointer::New(GetMethod())` call in `NodeBIO::New` because the `New` method cannot handle a null pointer despite other code already guarding for this (e.g. the `NodeBIO::New` function already checks `bio`). This patch solves the issues by adding more null checks. PR-URL: https://github.com/nodejs/node/pull/61788 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> |
||
|---|---|---|
| .. | ||
| BUILD.gn | ||
| engine.cc | ||
| ncrypto.cc | ||
| ncrypto.gyp | ||
| ncrypto.h | ||
| README.md | ||
| unofficial.gni | ||
Node.js crypto (ncrypto) library
The ncrypto library extracts the base internal implementation of Node.js crypto operations
that support both node:crypto and Web Crypto implementations and makes them available for
use in other projects that need to emulate Node.js' behavior.