Skip to content

stdin read seems racy #99

@dsherret

Description

@dsherret

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions