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

Unsafe memory allocation #10

Open
OrangeDog opened this issue Nov 17, 2011 · 3 comments
Open

Unsafe memory allocation #10

OrangeDog opened this issue Nov 17, 2011 · 3 comments

Comments

@OrangeDog
Copy link

Buffer::New can return NULL but this is never checked (e.g. compress.cc:238), causing segfaults later on.

@OrangeDog
Copy link
Author

This commit fixes the segfault, but I can't seem to send a pull request of just this one.

OrangeDog@2d774a7

@Woodya
Copy link
Owner

Woodya commented Jan 8, 2015

thanks, sorry haven't been maintaining this. i'll fold this in this week after i look it over.

@Woodya
Copy link
Owner

Woodya commented Jan 8, 2015

@OrangeDog do you have an example where Buffer::New returns null?
i think the snprintf changes look good, but looking at the (current) bufferr::new impl, i'm unsure if the buffer::new -> NULL issue still exists, or was "fixed" at the root.
https://github.com/joyent/node/blob/master/src/node_buffer.cc#L157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants