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

pimd: fix misplaced braces/logic error in pim_rp_set_upstream_addr #16299

Merged

Conversation

eqvinox
Copy link
Contributor

@eqvinox eqvinox commented Jun 26, 2024

The !rp_info || check got added during a cleanup pass. Unfortunately the braces/and/or combination is not correct :(

(for rp_info == NULL && source != INADDR_ANY)

Fixes: b194536 ("pimd: Various buffer overflow reads and crashes")

eqvinox added 2 commits June 26, 2024 16:15
The `!rp_info ||` check got added during a cleanup pass.  Unfortunately
the braces/and/or combination is not correct :(

Fixes: b194536 ("pimd: Various buffer overflow reads and crashes")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Somehow this tiny function ended up being written in a very convoluted
way that enabled the braces mixup in the previous commit.  Rewrite it to
be less confusing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
@eqvinox eqvinox requested a review from donaldsharp June 26, 2024 14:17
@donaldsharp donaldsharp merged commit 453cbf6 into FRRouting:master Jun 27, 2024
16 checks passed
@eqvinox eqvinox deleted the pim-logic-braces-20240625 branch July 1, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants