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

Don't error with unexpected end of entry for RFC 3597 RDATA of length zero. #475

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ximon18
Copy link
Member

@ximon18 ximon18 commented Jan 7, 2025

RFC 3597 says:

If the RDATA is of zero length, the text representation contains only
the # token and the single zero representing the length.

However, domain is currently unable to parse such input, e.g. the following produces an unexpected end of entry error:

example.org. 240 IN SOA  example.net. hostmaster.example.net. 1234567890 28800 7200 604800 240
b.example.org   IN          TYPE62347       \# 0

This PR alters the parsing of unknown RDATA so that the end of line check to be before the attempt to consume the next token.

@ximon18 ximon18 requested a review from a team January 7, 2025 12:04
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.

1 participant