src: fix ArrayBuffer size for zero fill flag
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
buffer
Description of change
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.
Fixes: https://github.com/nodejs/node/issues/7140
Labelling this this as dont-land-* like #7082 itself.