mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-29 21:07:44 +00:00
DomainTree: returning null in ConvertKeyToLabel() when domain length is less than 1.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2020 Shreyas Zare (shreyas@technitium.com)
|
||||
Copyright (C) 2021 Shreyas Zare (shreyas@technitium.com)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -158,7 +158,11 @@ namespace DnsServerCore.Dns.Zones
|
||||
|
||||
protected static string ConvertKeyToLabel(byte[] key, int startIndex)
|
||||
{
|
||||
byte[] domain = new byte[key.Length - startIndex];
|
||||
int length = key.Length - startIndex;
|
||||
if (length < 1)
|
||||
return null;
|
||||
|
||||
byte[] domain = new byte[length];
|
||||
int i;
|
||||
int k;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user