buffer: don't CHECK on zero-sized realloc
malloc(0) and realloc(ptr, 0) have implementation-defined behavior in that the standard allows them to either return a unique pointer or a nullptr for zero-sized allocation requests. Normalize by always using a nullptr. Fixes: https://github.com/nodejs/node/issues/3496 PR-URL: https://github.com/nodejs/node/pull/3499 Reviewed-By:Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Trevor Norris <trev.norris@gmail.com>
parent
3a091d29
Please register or sign in to comment