-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
segmentation fault for buffer.copy() with no args #1519
Labels
Comments
Have a patch coming. |
trevnorris
added a commit
to trevnorris/node
that referenced
this issue
Apr 24, 2015
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
added a commit
to trevnorris/node
that referenced
this issue
Apr 24, 2015
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
added a commit
to trevnorris/node
that referenced
this issue
Apr 24, 2015
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
mscdex
added
confirmed-bug
Issues with confirmed bugs.
buffer
Issues and PRs related to the buffer subsystem.
labels
Apr 24, 2015
trevnorris
added a commit
that referenced
this issue
Apr 24, 2015
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: #1519 PR-URL: #1520 Reviewed-by: Evan Lucas <evanlucas@me.com>
Fixed by 5404cbc. |
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
Apr 29, 2015
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 PR-URL: nodejs#1520 Reviewed-by: Evan Lucas <evanlucas@me.com>
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this issue
Apr 30, 2015
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 PR-URL: nodejs#1520 PORT-PR-URL: nodejs#1559 Reviewed-by: Evan Lucas <evanlucas@me.com>
This was referenced Nov 25, 2020
This was referenced Jun 21, 2023
This was referenced Jul 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
To reproduce from the command line:
While this isn't valid input to
copy
, this should probably not segfault.Tested on iojs 1.8.1. Same issue in node 0.12.2.
The text was updated successfully, but these errors were encountered: