Commit 3337b09
crypto: fix potential null pointer dereference when BIO_meth_new() fails
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: #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>1 parent 46a6192 commit 3337b09Copy full SHA for 3337b09
2 files changed
+2Lines changed: 2 additions & 0 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- deps/ncrypto
- src/crypto
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1470 | 1470 | |
1471 | 1471 | |
1472 | 1472 | |
| 1473 | + |
1473 | 1474 | |
1474 | 1475 | |
1475 | 1476 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
226 | 226 | |
227 | 227 | |
228 | 228 | |
| 229 | + |
229 | 230 | |
230 | 231 | |
231 | 232 | |
|
0 commit comments