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

rec: check bounds of rcode stats counter index (safe right now) #15139

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

omoerbeek
Copy link
Member

@omoerbeek omoerbeek commented Feb 11, 2025

Safe right now as LWResult::d_rcode gets assigned from the 4 bit rcode in the header. But that might change one day. I'd rather make LWResult::d_rcode an uint8_t, but that causes a conflict with the OOB resolving code that does not make a difference between res and d_rcode.

Also fix a typo in a constant name and reorder fields in LWResult largest to smallest.

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@omoerbeek omoerbeek added the rec label Feb 11, 2025
@omoerbeek omoerbeek added this to the rec-5.3.0 milestone Feb 11, 2025
Safe right now as LWResult::d_rcode gets assigned from the 4 bit
rcode in the header.  But that might change one day. I'd rather
make LWResult::d_rcode an uint8_t, but that causes a conflict with
the OOB resolving code that does not make a difference between res
and d_rcode.
@omoerbeek omoerbeek force-pushed the rec-bound-check-for-future branch from 4c2e8cf to 5280f00 Compare February 11, 2025 09:35
pdns/recursordist/syncres.cc Outdated Show resolved Hide resolved
Co-authored-by: Remi Gacogne <[email protected]>
@omoerbeek omoerbeek force-pushed the rec-bound-check-for-future branch from ae637e8 to 8530269 Compare February 11, 2025 13:43
@omoerbeek omoerbeek merged commit 5569b42 into PowerDNS:master Feb 11, 2025
83 checks passed
@omoerbeek omoerbeek deleted the rec-bound-check-for-future branch February 11, 2025 14:17
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