-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bufferify doesn't handle Uint8Array properly #86
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/merkletreejs/merkletreejs/blob/master/src/Base.ts#L173
The code assumes the buffer only contains the bytes of the ArrayBuffer view, but the Uint8Array buffer could be larger than the view.
Buffer.from
should also include the offset and length.Example of
Buffer.from(arrayBuffer[, byteOffset[, length]])
from https://nodejs.org/api/buffer.html#static-method-bufferfromarraybuffer-byteoffset-lengthThe text was updated successfully, but these errors were encountered: