diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-29 14:12:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-30 19:37:41 +0100 |
commit | 3b37fa735224e58fcc23c737b764d13e22c2885b (patch) | |
tree | 45fc4141398824a587a28116506184e5e405bf15 /src/test | |
parent | bca27e1729b496081b0fa4e2754f5fcdcc0efce5 (diff) |
dns-domain: be more strict when encoding/decoding labels
Labels of zero length are not OK, refuse them early on. The concept of a
"zero-length label" doesn't exist, a zero-length full domain name
however does (representing the root domain). See RFC 2181, Section 11.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-dns-domain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c index f010e4e19a..7ad59d378a 100644 --- a/src/test/test-dns-domain.c +++ b/src/test/test-dns-domain.c @@ -136,7 +136,7 @@ static void test_dns_label_escape_one(const char *what, size_t l, const char *ex } static void test_dns_label_escape(void) { - test_dns_label_escape_one("", 0, "", 0); + test_dns_label_escape_one("", 0, NULL, -EINVAL); test_dns_label_escape_one("hallo", 5, "hallo", 5); test_dns_label_escape_one("hallo", 6, NULL, -EINVAL); test_dns_label_escape_one("hallo hallo.foobar,waldi", 24, "hallo\\032hallo\\.foobar\\044waldi", 31); |