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

Fix an overflow bug in String.concat #833

Merged
merged 4 commits into from Oct 4, 2016

Conversation

Projects
None yet
2 participants
@yallop
Member

yallop commented Oct 3, 2016

See previous discussion under #805, #815.

/cc @damiendoligez

Show outdated Hide outdated stdlib/bytes.ml
let concat sep l =
match l with
[] -> empty
let ensure_ge x y = if x >= y then x else invalid_arg "String.concat"

This comment has been minimized.

@damiendoligez

damiendoligez Oct 3, 2016

Member

This should be Bytes.concat, right?

@damiendoligez

damiendoligez Oct 3, 2016

Member

This should be Bytes.concat, right?

This comment has been minimized.

@yallop

yallop Oct 3, 2016

Member

Indeed; fixed in 806c4a1.

@yallop

yallop Oct 3, 2016

Member

Indeed; fixed in 806c4a1.

@damiendoligez damiendoligez merged commit 7a7a7d8 into ocaml:trunk Oct 4, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

damiendoligez added a commit that referenced this pull request Oct 4, 2016

Fix an overflow bug in String.concat (#833)
Fix an overflow bug in String.concat and make the function faster.
@damiendoligez

This comment has been minimized.

Show comment
Hide comment
@damiendoligez

damiendoligez Oct 4, 2016

Member

Perfect. Merged and cherry-picked to 4.04 (commit 18e33a6).

Thank you.

Member

damiendoligez commented Oct 4, 2016

Perfect. Merged and cherry-picked to 4.04 (commit 18e33a6).

Thank you.

@yallop yallop deleted the yallop:concat branch Oct 4, 2016

@hannesm hannesm referenced this pull request Nov 21, 2016

Closed

enforce the right minimum OCaml version #696

0 of 3 tasks complete

camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017

Fix an overflow bug in String.concat (#833)
Fix an overflow bug in String.concat and make the function faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment