MCPcopy Create free account
hub / github.com/TruthHun/BookStack / checkOffset

Function checkOffset

static/word2md/mammoth.browser.js:10786–10789  ·  view source on GitHub ↗
(offset, ext, length)

Source from the content-addressed store, hash-verified

10784 * Need to make sure that buffer isn't trying to write out of bounds.
10785 */
10786function checkOffset (offset, ext, length) {
10787 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
10788 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
10789}
10790
10791Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
10792 offset = offset | 0

Callers 1

mammoth.browser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected