VFS readFile often returns Uint8Array; SFTP DATA and CHANNEL_DATA assumed

Buffer.isBuffer or treated payloads as UTF-8, corrupting packets and risking
native aborts (bad_optional_access). Normalize ArrayBuffer views in
SFTP.prototype.data and Protocol channelData/channelExtData; align READ shim.

Also includes earlier SFTP hardening: REQUEST.READ/WRITE/FSETSTAT guards,
enqueueSftpReply(reqid) + FAILURE on handler error, CHANGELOG.
This commit is contained in:
Raven Scott
2026-04-21 18:06:22 -04:00
parent 0359129a72
commit baae7b3482
13 changed files with 432 additions and 416 deletions
@@ -1,7 +1,7 @@
{
"schema": 2,
"profileId": "bare-os-posix-like",
"generatedAt": "2026-04-21T21:59:29.663Z",
"generatedAt": "2026-04-21T22:05:44.363Z",
"note": "Sparse POSIX Issue 7 coverage hints for /bin utilities. Omitted command names are not yet profiled here.",
"commandIndex": [
{