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

Fix: Use source size copying strings with memcpy #746

Merged
merged 1 commit into from Mar 21, 2023

Conversation

timopollmeier
Copy link
Member

What

When copying strings with memcpy in places where strncpy was used before, use the size of the source string instead of the destination size.

Why

Using the destination size can cause errors if it is larger than the source size.

References

Checklist

  • Tests

@timopollmeier timopollmeier requested a review from a team as a code owner March 21, 2023 10:43
@timopollmeier timopollmeier added the backport-to-stable This pull request will be backported to the 21.04 branch label Mar 21, 2023
@timopollmeier timopollmeier removed the backport-to-stable This pull request will be backported to the 21.04 branch label Mar 21, 2023
@nichtsfrei nichtsfrei merged commit 297cee3 into greenbone:main Mar 21, 2023
1 check passed
@nichtsfrei nichtsfrei added the backport-to-stable This pull request will be backported to the 21.04 branch label Apr 3, 2023
timopollmeier added a commit that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-stable This pull request will be backported to the 21.04 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants