denoland / denoland/node_shims
stdin read seems racy
Open
- Dominant language
- TypeScript
- Stars
- 160
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
This line when reading stdin seems racy:
https://github.com/denoland/node_deno_shims/blob/bd4a83ef3fb0788541191e4a089563c63da6cd1f/packages/shim-deno/src/deno/stable/variables/std.ts#L29
I think it's possible that between the `process.stdin.read(p.length)` and `process.stdin.read()` calls that stdin could receive more bytes than are in the buffer, which would cause a `RangeError`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.