Commit ac0665c9 authored by Anna Henningsen's avatar Anna Henningsen Committed by Nikolai Vavilov
Browse files

src: fix ArrayBuffer size for zero fill flag

Use `sizeof()` of the zero fill flag as the byte length of the
`zeroFill` array buffer rather than `1`.

This fixes running debug builds, which have boundary checks for
typed array creations from native code enabled.

PR-URL: https://github.com/nodejs/node/pull/7142
Fixes: https://github.com/nodejs/node/issues/7140


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarNikolai Vavilov <vvnicholas@gmail.com>
parent c4fadbc1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment