Commit ed640ae4 authored by Rich Trott's avatar Rich Trott Committed by Michael Dawson
Browse files

crypto: make malloc failure check cross-platform

`malloc(0)` may return NULL on some platforms. Do not report
out-of-memory error unless `malloc` was passed a number greater than
`0`.

PR-URL: https://github.com/nodejs/node/pull/8352


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent a00ccb0f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment