postwait/node-amqp — pull request #92 by utobi (2012-04-16 15:00:48+00:00)
Title: quick fix for issue #65

At data.copy(), sourceEnd was sometimes bigger than data.length which caused the error. This makes sure sourceEnd does not exceed data.length. Fixed the problem for me.