resolve: limit the number NTAs to something sensible
This commit is contained in:
@@ -683,6 +683,9 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (strv_length(ntas) > LINK_NEGATIVE_TRUST_ANCHORS_MAX)
|
||||
return sd_bus_error_set(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many negative trust anchors per link");
|
||||
|
||||
STRV_FOREACH(i, ntas) {
|
||||
r = dns_name_is_valid(*i);
|
||||
if (r < 0)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define LINK_SEARCH_DOMAINS_MAX 1024
|
||||
#define LINK_DNS_SERVERS_MAX 256
|
||||
#define LINK_NEGATIVE_TRUST_ANCHORS_MAX 2048
|
||||
|
||||
typedef struct LinkAddress {
|
||||
Link *link;
|
||||
|
||||
Reference in New Issue
Block a user