diff --git a/DnsServerCore/Dns/ResourceRecords/DnsResourceRecordInfo.cs b/DnsServerCore/Dns/ResourceRecords/DnsResourceRecordInfo.cs index c70087bc..8055c1e1 100644 --- a/DnsServerCore/Dns/ResourceRecords/DnsResourceRecordInfo.cs +++ b/DnsServerCore/Dns/ResourceRecords/DnsResourceRecordInfo.cs @@ -220,7 +220,13 @@ namespace DnsServerCore.Dns.ResourceRecords public string Comments { get { return _comments; } - set { _comments = value; } + set + { + if (value.Length > 255) + throw new ArgumentOutOfRangeException(nameof(Comments), "Resource record comment text cannot exceed 255 characters."); + + _comments = value; + } } public DateTime DeletedOn