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 EOF data section size validation #15667

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

cameel
Copy link
Member

@cameel cameel commented Dec 19, 2024

Discovered in #15612 (comment).

According to EOF spec the size of the data section must be in range 0x0000-0xFFFF so std::numeric_limits<uint16_t>::max() is still a valid value. This PR fixes that validation.

I also includes a few tiny unrelated fixes that are too small to bother with a separate PR (mostly typos and whitespace).

@cameel cameel added the EOF label Dec 19, 2024
@cameel cameel self-assigned this Dec 19, 2024
matheusaaguiar
matheusaaguiar previously approved these changes Dec 19, 2024
@cameel cameel force-pushed the fix-eof-data-section-size-validation branch from 2115f2a to c158522 Compare December 19, 2024 16:36
@cameel
Copy link
Member Author

cameel commented Dec 19, 2024

Added a small tweak: I noticed that preDeployAndStaticAuxDataSize could be moved earlier and reused in the check to make it clearer.

@cameel cameel force-pushed the fix-eof-data-section-size-validation branch from c158522 to bb9d694 Compare December 19, 2024 16:44
@cameel cameel enabled auto-merge December 19, 2024 16:58
@cameel cameel merged commit 55c6578 into develop Dec 19, 2024
73 checks passed
@cameel cameel deleted the fix-eof-data-section-size-validation branch December 19, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants