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

In_channel.input_all limited to small inputs #10976

Closed
mllken opened this issue Feb 1, 2022 · 1 comment · Fixed by #10978
Closed

In_channel.input_all limited to small inputs #10976

mllken opened this issue Feb 1, 2022 · 1 comment · Fixed by #10978

Comments

@mllken
Copy link

mllken commented Feb 1, 2022

It seems In_channel.input_all cannot read more than 65536 bytes, but I would have expected to be able to read much higher amounts:

$ ocamlopt --version
4.14.0+dev4-2022-01-20
$ cat h.ml
let () =
ignore @@ In_channel.input_all stdin
$ ocamlopt -o h h.ml
$ head -c 65537 /dev/urandom | ./h
Fatal error: exception Invalid_argument("index out of bounds")

@nojb
Copy link
Contributor

nojb commented Feb 1, 2022

Thanks for the report! There is an embarrasing bug in the implementation of input_all, will be fixed in #10978.

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

Successfully merging a pull request may close this issue.

2 participants