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: return valid byte slice on csaf channel #43

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

mgoetzegb
Copy link
Member

What

Send a newly created byte slice with the csaf document content on the channel. Previously the sent byte slice was gained from the method Buffer.Bytes(). However this "slice is valid for use only until the next buffer modification" and therefore modified with the next buffer modification..

Why

The bug caused a data race. If the receiver is not processing the content from the channel fast enough, the content of the returned byte slice is overwritten by the next downloaded CSAF.

Send a newly created byte slice with the csaf document content on the channel. Previously the sent byte slice was gained from the method `Buffer.Bytes()`. However this "slice is valid for use only until the next buffer modification" and therefore modified with the next buffer modification..
@mgoetzegb mgoetzegb added the patch release Set label to create a patch release label Sep 26, 2024
@mgoetzegb mgoetzegb requested a review from a team as a code owner September 26, 2024 09:08
Copy link

Conventional Commits Report

Type Number
Bug Fixes 1

🚀 Conventional commits found.

@mgoetzegb mgoetzegb merged commit 2e76e10 into main-gb Sep 26, 2024
4 of 5 checks passed
@mgoetzegb mgoetzegb deleted the fix-csaf-channel-forward branch September 26, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Set label to create a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants