Skip to content

Conversation

pva
Copy link

@pva pva commented Sep 17, 2024

Suggestion to fixes issue #12.

@pva
Copy link
Author

pva commented Sep 17, 2024

Oh, BTW, probably we need to copy env_path to a temporary buffer, otherwise reset will not work. I'll fix this if you agree with a general idea of the patch.

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

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

python-exec avoids allocating memory by design. Not to mention you don't even check for failed allocations, so you're introducing a vulnerability.

@pva
Copy link
Author

pva commented Sep 17, 2024

python-exec avoids allocating memory by design. Not to mention you don't even check for failed allocations, so you're introducing a vulnerability.

Yea, I've noticed that there are no allocations but I wanted to check that with new path there will be no warning. It worked.

Do you have any idea on how to update env without allocating place to store updated PATH value? Static buffer? I failed to find size for such buffer. It looks like there is no limit on size for env variable value.

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.

2 participants