Unsafe memory allocation #10

OrangeDog opened this Issue Nov 17, 2011 · 3 comments


None yet

2 participants


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


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



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


@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment