Azure/azure-sdk-for-node — pull request #1215 by JonathanSmith (2014-05-17 00:36:37+00:00)
Title: Fixes to ChunkStream sending incorrect size and failing with oob if chunks are the wrong size.

While streaming using createBlob I found two errors in the ChunkStream:

The first was that if the data.length and chunk size (_highWaterMark), were not multiples of each other, you would get an oob when trying to stream to it. (Fixed by using 'copied' instead of 'data.length' to increment the _internalBufferSize in copyToInternalBuffer).

The second was that the first copyToInternalBuffer in _buildChunk was receiving the wrong starting offset after re-syncing the frame, this was fixed by replacing '0' with 'dataOffset'.

See: https://github.com/Azure/azure-sdk-for-node/pull/1214
Where I was submitting this to the wrong branch.

Will have CLA in Monday.

Thanks,

-Jon