Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: don't CHECK on zero-sized realloc #3499

Merged
merged 1 commit into from
Oct 23, 2015

Commits on Oct 23, 2015

  1. 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: nodejs#3496
    PR-URL: nodejs#3499
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bnoordhuis committed Oct 23, 2015
    Configuration menu
    Copy the full SHA
    594500f View commit details
    Browse the repository at this point in the history