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

caml_output_value_to_bytes: avoid integer overflow #8788

Merged
merged 3 commits into from Jul 11, 2019

Conversation

@yallop
Copy link
Member

commented Jul 2, 2019

Use intnat, not int, to represent pointer difference.

Fixes #8787

Use intnat, not int, to represent pointer difference.
@dra27
dra27 approved these changes Jul 3, 2019
Copy link
Contributor

left a comment

Just needs a changes entry, please.

@yallop

This comment has been minimized.

Copy link
Member Author

commented Jul 3, 2019

There's a Changes entry in 2aa1b3f .

Use intnat, not int, to represent pointer difference.
@yallop

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

I've added another commit for what appears to be the same problem in caml_output_value_to_malloc (fa9051a). I haven't tested the change, because that function doesn't appear to be used internally.

@yallop

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

@dra27: do you still approve after the latest change? If so, this can be merged.

@dra27

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

Yes, I do! @damiendoligez - 4.09 and 4.08? (I'll move the Changes entry to the right place before merging)

@mseri

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Thanks for the fast fix!

@damiendoligez

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@dra27 cherry-pick to 4.09, yes. Don't bother with 4.08, thanks.

@dra27 dra27 merged commit a451893 into ocaml:trunk Jul 11, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
dra27 added a commit that referenced this pull request Jul 11, 2019
dra27 added a commit that referenced this pull request Jul 11, 2019
Use intnat, not int, to represent pointer difference and avoid integer
overflow in caml_output_value_to_bytes and caml_output_value_to_malloc

(cherry picked from commit a451893)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.