From 4ac505f96c40a484a71133564693bdc70ef3a90d Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 9 Jan 2018 21:14:28 -0500 Subject: [PATCH] Additional validation --- ICD.Common.Utils/EventArguments/TcpReceiveEventArgs.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ICD.Common.Utils/EventArguments/TcpReceiveEventArgs.cs b/ICD.Common.Utils/EventArguments/TcpReceiveEventArgs.cs index 4683109..b6ad35a 100644 --- a/ICD.Common.Utils/EventArguments/TcpReceiveEventArgs.cs +++ b/ICD.Common.Utils/EventArguments/TcpReceiveEventArgs.cs @@ -19,6 +19,9 @@ namespace ICD.Common.Utils.EventArguments /// public TcpReceiveEventArgs(uint clientId, IEnumerable data) { + if (data == null) + throw new ArgumentNullException("data"); + m_ClientId = clientId; m_Data = StringUtils.ToString(data); } @@ -31,6 +34,9 @@ namespace ICD.Common.Utils.EventArguments /// public TcpReceiveEventArgs(uint clientId, IEnumerable data, int length) { + if (data == null) + throw new ArgumentNullException("data"); + m_ClientId = clientId; m_Data = StringUtils.ToString(data, length); }