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 counting of escape sequences when splitting TXT strings #1540

Merged
merged 1 commit into from
Apr 17, 2024

Commits on Mar 22, 2024

  1. Fix counting of escape sequences when splitting TXT strings

    `endingToTxtSlice`, used by TXT, SPF and a few other types, parses a
    string such as `"hello world"` from an RR's content in a zone file.
    These strings are limited to 255 characters, and `endingToTxtSlice`
    automatically splits them if they're longer than that. However, it
    didn't count the length correctly: escape sequences such as `\\` or
    `\123` were counted as multiple characters (2 and 4 respectively in
    these examples), but they should only count as one character because
    they represent a single byte in wire format (which is where this 255
    character limit comes from). This commit fixes that.
    janik-cloudflare committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    00d0072 View commit details
    Browse the repository at this point in the history