Navigation Menu

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

Harden descriptor_is_in_binary_mode #9892

Merged
merged 1 commit into from Sep 8, 2020
Merged

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Sep 8, 2020

Spotted while post-reviewing #9872 - the new descriptor_is_in_binary_mode contains a check which used to be in caml_channel_binary_mode. While it was almost certainly correct when the function was originally written in the nineties, extra modes were added in the version 7 CRT (.NET 2002). They're not compatible with the OCaml runtime, but it doesn't feel correct the querying an fd should actually change its properties. This simply tweaks the check restore the mode which was returned instead.

Copy link
Contributor

@xavierleroy xavierleroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thank you very much!

Feel free to add yourself as coauthor in the Changes file.

@dra27
Copy link
Member Author

dra27 commented Sep 8, 2020

I'm not sure the contribution counts relative to the rest of the PR! Git will, as it were, blame me if necessary in future...

@xavierleroy
Copy link
Contributor

Git never forgets! Merging...

@xavierleroy xavierleroy merged commit 2235354 into ocaml:trunk Sep 8, 2020
@dra27 dra27 deleted the harden-9872 branch July 6, 2021 14:05
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

Successfully merging this pull request may close these issues.

None yet

2 participants