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

Avoid unsafe strncpy() edge cases by always 0-terminating destination #577

Closed
wants to merge 2 commits into from
Closed

Conversation

tarmasr
Copy link

@tarmasr tarmasr commented Mar 26, 2024

@arnopo: as requested.

This PR adds 0-termination of the destination buffer after each call of strncpy() in the open-amp project. In one place optional {...} braces were added to an else branch because its if branch now needs braces.

@tarmasr tarmasr changed the title Avoid unsafe strncpy() edge cases by always 0-terminating destination buffer Avoid unsafe strncpy() edge cases by always 0-terminating destination Mar 26, 2024
@tarmasr tarmasr closed this Mar 26, 2024
@tarmasr tarmasr reopened this Mar 26, 2024
@tarmasr tarmasr closed this by deleting the head repository Mar 27, 2024
@arnopo arnopo linked an issue Mar 29, 2024 that may be closed by this pull request
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.

1 participant