Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upZero-byte allocation causes assertion failure #25247
Comments
tniessen
added a commit
to tniessen/node
that referenced
this issue
Dec 28, 2018
When an empty string was passed, malloc might have returned a nullptr depending on the platform, causing an assertion failure. This change makes private key parsing behave as public key parsing does, causing a BIO error instead that can be caught in JS. Fixes: nodejs#25247
This comment has been minimized.
This comment has been minimized.
|
Same in macOS high sierra |
This comment has been minimized.
This comment has been minimized.
|
@tniessen are you looking into this or should I give it a swing? P.S. should've seen the ref. |
This comment has been minimized.
This comment has been minimized.
targos
added a commit
that referenced
this issue
Jan 1, 2019
When an empty string was passed, malloc might have returned a nullptr depending on the platform, causing an assertion failure. This change makes private key parsing behave as public key parsing does, causing a BIO error instead that can be caught in JS. Fixes: #25247 PR-URL: #25248 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
refack
added a commit
to refack/node
that referenced
this issue
Jan 14, 2019
When an empty string was passed, malloc might have returned a nullptr depending on the platform, causing an assertion failure. This change makes private key parsing behave as public key parsing does, causing a BIO error instead that can be caught in JS. Fixes: nodejs#25247 PR-URL: nodejs#25248 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tniessen commentedDec 28, 2018
Passing an empty string to any function that parses a private key causes an assertion failure: