Commit b7b0768
tls: fix error stack conversion in cryptoErrorListToException()
The ncrypto move introduced regressions in
cryptoErrorListToException() by passing in the size of the
vector unnecessarily into the vector constructor and then use
push_back() (which would result in a crash on dereferencing empty
handles during later iteration) and having incorrect logic for
checking the presence of an exception. This patch fixes it.
PR-URL: #56554
Fixes: #56375
Refs: #53803
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>1 parent 4aa1afd commit b7b0768Copy full SHA for b7b0768
File tree
Expand file treeCollapse file tree
2 files changed
+23
-4
lines changedOpen diff view settings
Filter options
- src/crypto
- test/parallel
Expand file treeCollapse file tree
2 files changed
+23
-4
lines changedOpen diff view settings
Collapse file
+5-4Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
237 | 237 | |
238 | 238 | |
239 | 239 | |
240 | | - |
| 240 | + |
| 241 | + |
241 | 242 | |
242 | 243 | |
243 | 244 | |
| ||
255 | 256 | |
256 | 257 | |
257 | 258 | |
258 | | - |
259 | | - |
260 | | - |
| 259 | + |
| 260 | + |
| 261 | + |
261 | 262 | |
262 | 263 | |
263 | 264 | |
|
Collapse file
test/parallel/test-tls-error-stack.js
Copy file name to clipboard+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
0 commit comments