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

Use snprintf instead of sprintf #11605

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

kit-ty-kate
Copy link
Member

Noticed while porting ocaml-solo5 to OCaml 5.0. It looks more safe this way in case the message somehow gets bigger than 512 bytes.

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, thanks!

(Aside: I had to read the original code several times to understand what it does, but I managed.)

@xavierleroy xavierleroy merged commit 85df591 into ocaml:trunk Oct 5, 2022
xavierleroy pushed a commit that referenced this pull request Oct 5, 2022
@xavierleroy
Copy link
Contributor

Cherry-picked to 5.0: 5925908

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

Successfully merging this pull request may close these issues.

2 participants