I got this crash report from Manyverse. I still don't know what the reproduction steps are, but reporting all the details I can, maybe it helps figure this out.
const HEADER_SIZE = 2 // uint16
function size(dataBuf) {
return HEADER_SIZE + dataBuf.length
}
function readDataLength(blockBuf, offsetInBlock) {
return blockBuf.readUInt16LE(offsetInBlock) // <-----------------------
}
function readSize(blockBuf, offsetInBlock) {
const dataLength = readDataLength(blockBuf, offsetInBlock)
return HEADER_SIZE + dataLength
}
RangeError: The value of "offset" is out of range. It must be >= 0 and <= 65534. Received 95084
File "internal/buffer.js", line 81, col 9, in boundsError
File "internal/buffer.js", line 238, col 5, in Buffer.readUInt16LE
File "nodejs-project/index.js", line 109582, col 19, in Object.readDataLength
File "nodejs-project/index.js", line 111380, col 31, in Object.getDataNextOffset
File "nodejs-project/index.js", line 47642, col 44, in Stream._handleBlock
File "nodejs-project/index.js", line 47701, col 27, in Stream._resumeCallback
File "nodejs-project/index.js", line 111353, col 9, in Request.onRAFReadDone [as _callback]
File "nodejs-project/index.js", line 138474, col 8, in Request.callback
File "nodejs-project/index.js", line 24593, col 31, in onread
File "fs.js", line 520, col 5, in FSReqCallback.wrapper [as oncomplete]
I got this crash report from Manyverse. I still don't know what the reproduction steps are, but reporting all the details I can, maybe it helps figure this out.
Versions
Resources
Code block
Stack trace