mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-03-03 20:26:25 +00:00
DnsResourceRecordInfo: fixed issue of missing null check causing error when saving SOA record without comments or when changing server name.
This commit is contained in:
@@ -222,7 +222,7 @@ namespace DnsServerCore.Dns.ResourceRecords
|
||||
get { return _comments; }
|
||||
set
|
||||
{
|
||||
if (value.Length > 255)
|
||||
if ((value is not null) && (value.Length > 255))
|
||||
throw new ArgumentOutOfRangeException(nameof(Comments), "Resource record comment text cannot exceed 255 characters.");
|
||||
|
||||
_comments = value;
|
||||
|
||||
Reference in New Issue
Block a user