[systemd-devel] [PATCH] Stop crashing on empty TXT
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Thu Nov 27 08:09:14 PST 2014
On Thu, Nov 27, 2014 at 04:12:20PM +0100, David Herrmann wrote:
> Hi
>
> On Tue, Nov 18, 2014 at 4:52 AM, Stanisław Pitucha <viraptor at gmail.com> wrote:
> > TXT records should have at least one character, so enforce this.
> > Previously parser SIGSEGV'd on ->txt.strings being NULL.
>
> Your patch fixes the issue, indeed. However, I didn't have the time to
> look this up in the DNS RFC. I'm not really sure TXT records cannot be
> empty (and I'm not sure any follow-up RFC allows empty records).
> Therefore, I fixed resolved to work with empty txt.strings strvs
> instead. See:
I think we should follow the RFCs here and reject invalid TXT strings.
RFC1035 says "TXT-DATA One or more <character-string>s."
So {""} is fine (strv size one, with an empty string), but not {}.
I pushed Stanisław's patch, with an updated commit message.
Zbyszek
More information about the systemd-devel
mailing list