Skip to content

Fix #79812: Potential integer overflow in pcntl_exec() #6845

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

Closed
wants to merge 3 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Apr 8, 2021

We use the proper type.

@cmb69 cmb69 added the Bug label Apr 8, 2021
@nikic
Copy link
Member

nikic commented Apr 8, 2021

The length addition can still overflow, I'd suggest to use safe_emalloc.

cmb69 added 2 commits April 9, 2021 10:48
We can assume that neither string length is `SIZE_MAX`, and then use
`safe_emalloc()` to ensure that the addition does not overflow.
@cmb69
Copy link
Member Author

cmb69 commented Apr 9, 2021

Oh, right; better safe than sorry.

@cmb69 cmb69 closed this in 0a36d41 Apr 12, 2021
@cmb69 cmb69 deleted the cmb/79812 branch April 12, 2021 10:18
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