summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-dns-domain.c')
-rw-r--r--src/resolve/resolved-dns-domain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-domain.c b/src/resolve/resolved-dns-domain.c
index 27739c1e57..a41052dde3 100644
--- a/src/resolve/resolved-dns-domain.c
+++ b/src/resolve/resolved-dns-domain.c
@@ -203,6 +203,9 @@ int dns_name_normalize(const char *s, char **_ret) {
n += r;
}
+ if (n > DNS_NAME_MAX)
+ return -EINVAL;
+
if (!GREEDY_REALLOC(ret, allocated, n + 1))
return -ENOMEM;