MCPcopy
hub / github.com/feross/buffer / checkOffset

Function checkOffset

index.js:1125–1128  ·  view source on GitHub ↗
(offset, ext, length)

Source from the content-addressed store, hash-verified

1123 * Need to make sure that buffer isn't trying to write out of bounds.
1124 */
1125function checkOffset (offset, ext, length) {
1126 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
1127 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
1128}
1129
1130Buffer.prototype.readUintLE =
1131Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…