joyent/node — pull request #4447 by trevnorris (2012-12-20 19:51:26+00:00)
Title: Buffer assertion fix

The first commit adds a check to write at offset `-Infinity`.

The second consolidates write assert checks into a set of 3 functions. This also removes a few duplicate checks that existed.

The third consolidates and fixes the assert checks for the read methods.

If the seconds and third commits are too much of a change, just cherry-pick the first.

These changes currently conflict with master. I can port the patch if needed.