From 1fb3371e9403ebff67a742f98b64ce2355777996 Mon Sep 17 00:00:00 2001 From: Zafer Balkan Date: Thu, 29 Jan 2026 19:31:54 +0200 Subject: [PATCH 1/2] TryParse must fail on empty string, whitespace and null strings --- TechnitiumLibrary.Net/DomainEndPoint.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TechnitiumLibrary.Net/DomainEndPoint.cs b/TechnitiumLibrary.Net/DomainEndPoint.cs index b911a584..5dc78c8e 100644 --- a/TechnitiumLibrary.Net/DomainEndPoint.cs +++ b/TechnitiumLibrary.Net/DomainEndPoint.cs @@ -61,6 +61,12 @@ private DomainEndPoint() public static bool TryParse(string value, out DomainEndPoint ep) { + if (string.IsNullOrWhiteSpace(value)) + { + ep = null; + return false; + } + string[] parts = value.Split(':'); if (parts.Length > 2) { From 395893a80b9f855302597b4761af2774e11b7fc0 Mon Sep 17 00:00:00 2001 From: Zafer Balkan Date: Tue, 3 Feb 2026 19:10:37 +0200 Subject: [PATCH 2/2] Added copyright --- TechnitiumLibrary.Net/NetworkAddress.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/TechnitiumLibrary.Net/NetworkAddress.cs b/TechnitiumLibrary.Net/NetworkAddress.cs index 918a7fba..5a823635 100644 --- a/TechnitiumLibrary.Net/NetworkAddress.cs +++ b/TechnitiumLibrary.Net/NetworkAddress.cs @@ -1,6 +1,7 @@ /* Technitium Library Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2026 Zafer Balkan (zafer@zaferbalkan.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