tls: fix error stack conversion in cryptoErrorListToException() · nodejs/node@b7b0768 · GitHub
Skip to content

Commit b7b0768

Browse files
joyeecheungaduh95
authored andcommitted
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 b7b0768

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

src/crypto/crypto_util.cc

Lines changed: 5 additions & 4 deletions
Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)