Unverified Commit d117e41e authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruben Bridgewater
Browse files

src: do not make `Resize(0)`’d buffers base `nullptr`

This fixes issues in which APIs that accept pointers created this way
treat `nullptr` and a zero-length buffer differently.
We already do something similar for our `Malloc()` implementation.

PR-URL: https://github.com/nodejs/node/pull/26731
Fixes: https://github.com/nodejs/node/issues/26514


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
parent bca23f2e
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