Skip to content

Conversation

@VictorColomb
Copy link

In response to #18.

Add a check on the input size of the Blake2b.prototope.update() method.

assert(input.length + head <= 65536000, 'input + head must be of size 65,536,000 or less')

Reason

The WebAssembly instance memory is limited to 65,536,000 bytes (64 * 1,000 KiB) because of the following:

(memory (export "memory") 10 1000)

Therefore, the memory can only grow to this size, and the update() method fails when input.length + head > 65536000.

@VictorColomb
Copy link
Author

Ping @mafintosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant