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 incorrect size check in NFGenMsg #287

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Conversation

patryk4815
Copy link
Contributor

This patch resolves an issue with the size check in NFGenMsg.

Currently, the size is truncated to 4 bytes, but the check incorrectly expects 16 bytes. As a result, NFGenMsg.Decode is never executed.

You can find the relevant code here:

genmsg.Decode(msg.Data[:4])

This fix ensures that NFGenMsg is decoded correctly.

@stapelberg
Copy link
Collaborator

Would it be possible to add a test case for this issue? (If it’s too hard to craft such a test, that’s probably okay, I just figured I’d ask.)

@patryk4815
Copy link
Contributor Author

@stapelberg tomorrow I will check 👍

@patryk4815
Copy link
Contributor Author

@stapelberg done ;)

@stapelberg stapelberg merged commit eb34035 into google:main Dec 13, 2024
2 checks passed
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