stream: validate writevSync chunks before queuing · nodejs/node@a5e7d89 · GitHub
Skip to content

Commit a5e7d89

Browse files
trivikraduh95
authored andcommitted
stream: validate writevSync chunks before queuing
Ensure writevSync() validates every chunk before handing the batch to the push queue. Invalid chunks now throw ERR_INVALID_ARG_TYPE without leaving data readable from the failed write. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5 PR-URL: #64300 Fixes: #64299 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b57350f commit a5e7d89

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

lib/internal/streams/iter/utils.js

Lines changed: 3 additions & 4 deletions

test/parallel/test-stream-iter-push-writer.js

Lines changed: 23 additions & 0 deletions

0 commit comments

Comments
 (0)