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

Add a self-check test for processing a message which exceeds nanopb field size limits #589

Merged
merged 1 commit into from
May 11, 2023

Conversation

ivmaykov
Copy link
Contributor

@ivmaykov ivmaykov commented Apr 20, 2023

See title. This verifies that nanopb refuses to parse such messages, rather than blowing the stack.

@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch 6 times, most recently from 7f515e2 to 6a41ce1 Compare April 21, 2023 18:14
andozw
andozw previously approved these changes Apr 21, 2023
Copy link
Collaborator

@andozw andozw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a couple of nits and mostly just questions for my own learning.

core/include/checks.h Show resolved Hide resolved
core/CMakeLists.txt Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch 2 times, most recently from a990dd0 to d1c3725 Compare April 22, 2023 01:49
oreparaz
oreparaz previously approved these changes Apr 23, 2023
Copy link
Collaborator

@oreparaz oreparaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice explanations 💯

core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Outdated Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/rpc_checks.c Show resolved Hide resolved
core/src/checks/self_checks.c Show resolved Hide resolved
@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch 2 times, most recently from 92b5bfd to 68be7dd Compare April 24, 2023 20:07
oreparaz
oreparaz previously approved these changes May 2, 2023
Copy link
Collaborator

@oreparaz oreparaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, there's a conflict with core/CMakeLists.txt so happy to re stamp if needed.

@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch from 68be7dd to d7a10dc Compare May 5, 2023 23:14
@ivmaykov
Copy link
Contributor Author

ivmaykov commented May 5, 2023

@oreparaz @andozw rebased the branch and fixed merge conflicts, please approve again

@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch from d7a10dc to fec311f Compare May 5, 2023 23:17
@ivmaykov
Copy link
Contributor Author

ivmaykov commented May 5, 2023

Squished all 4 commits together

@ivmaykov ivmaykov force-pushed the rpc-oversized-message-check branch from fec311f to eae5fa4 Compare May 5, 2023 23:17
@ivmaykov ivmaykov merged commit 1e3ee6e into square:master May 11, 2023
@ivmaykov ivmaykov deleted the rpc-oversized-message-check branch May 11, 2023 23:26
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.

3 participants