Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdin read seems racy #99

Open
dsherret opened this issue Mar 11, 2022 · 0 comments
Open

stdin read seems racy #99

dsherret opened this issue Mar 11, 2022 · 0 comments

Comments

@dsherret
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant