Node: Zero-byte allocation causes assertion failure

Created on 28 Dec 2018  路  3Comments  路  Source: nodejs/node

  • Version: 11.6.0
  • Platform: Ubuntu, Windows
  • Subsystem: crypto

Passing an empty string to any function that parses a private key causes an assertion failure:

> crypto.createPrivateKey({ key: '' })
C:\WINDOWS\system32\cmd.exe - node[12104]: src\node_crypto.cc:2675: Assertion `(mem) != nullptr' failed.
confirmed-bug crypto security

Most helpful comment

All 3 comments

Same in macOS high sierra

@tniessen are you looking into this or should I give it a swing?

P.S. should've seen the ref.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcollina picture mcollina  路  3Comments

vsemozhetbyt picture vsemozhetbyt  路  3Comments

dfahlander picture dfahlander  路  3Comments

loretoparisi picture loretoparisi  路  3Comments

willnwhite picture willnwhite  路  3Comments