aboutsummaryrefslogtreecommitdiff
path: root/profiling/server/src/basePipeServer/BasePipeServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/server/src/basePipeServer/BasePipeServer.cpp')
-rw-r--r--profiling/server/src/basePipeServer/BasePipeServer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/profiling/server/src/basePipeServer/BasePipeServer.cpp b/profiling/server/src/basePipeServer/BasePipeServer.cpp
index 81f58a5ee9..96e8e24a2c 100644
--- a/profiling/server/src/basePipeServer/BasePipeServer.cpp
+++ b/profiling/server/src/basePipeServer/BasePipeServer.cpp
@@ -207,6 +207,12 @@ bool BasePipeServer::SendPacket(uint32_t packetFamily, uint32_t packetId, const
// And the rest of the data if there is any.
if (dataLength > 0)
{
+ if (data == nullptr)
+ {
+ throw ProfilingException(
+ "basePipeServer: SendPacket: Attempting to send a non-zero length data packet with a null data pointer"
+ );
+ }
memcpy((packet.data() + 8), data, dataLength);
}
EchoPacket(PacketDirection::Sending, packet.data(), packet.size());