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: fix copy() segfault with zero arguments #1520

Closed
wants to merge 1 commit into from

Commits on Apr 24, 2015

  1. buffer: fix copy() segfault with zero arguments

    Buffer#copy() immediately does a ToObject() on the first argument before
    it checks if it's even an Object. This causes
    Object::HasIndexedPropertiesInExternalArrayData() to be run on nothing,
    triggering the segfault. Instead run HasInstance() on the args Value.
    Which will check if it's actually an Object, before checking if it
    contains data.
    
    Fixes: nodejs#1519
    trevnorris committed Apr 24, 2015
    Configuration menu
    Copy the full SHA
    2d7fb76 View commit details
    Browse the repository at this point in the history