mirror of https://github.com/lukechilds/node.git
Browse Source
SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone attempted to SlowBuffer(0).slice(0, 1) an assert would fail in smalloc::SliceOnto. It's important that the check go where it is because the resulting Buffer needs to have external array data allocated. In the case a user tries to slice a zero length Buffer it will also have NULL passed as the data argument. Also fixed where the .parent attribute was set for zero length Buffers. There is no need to track the source of slice if the slice isn't actually occurring.v0.11.5-release
3 changed files with 18 additions and 7 deletions
Loading…
Reference in new issue