Commit Detail
Commit 43f60f0
Guard BYOB reader against buffer resize during pending read When a BYOB read is pending and the underlying resizable ArrayBuffer is resized, the destination pointer may reference decommitted virtual memory, causing a SIGSEGV in the memcpy inside tryRead. For resizable buffers, allocate a temporary heap buffer for the read and copy the data back into the user's buffer in the .then() callback after validating it is still large enough. Also add pre-read validation to return a zero-length view when byteOffset already exceeds the current ByteLength. Signed-off-by: James M Snell <jsnell@cloudflare.com>