From 048b9a94cd5b52ac7342385681c498dd863290a7 Mon Sep 17 00:00:00 2001 From: otavepto Date: Wed, 10 Apr 2024 08:00:19 +0200 Subject: [PATCH] make sure allocated data ptr in null (not garbage) --- dll/dll/steam_networking_utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/dll/steam_networking_utils.h b/dll/dll/steam_networking_utils.h index e83fb146..1de676f1 100644 --- a/dll/dll/steam_networking_utils.h +++ b/dll/dll/steam_networking_utils.h @@ -109,6 +109,7 @@ SteamNetworkingMessage_t *AllocateMessage( int cbAllocateBuffer ) if (cbAllocateBuffer < 0) cbAllocateBuffer = 0; + pMsg->m_pData = nullptr; if (cbAllocateBuffer) pMsg->m_pData = malloc(cbAllocateBuffer);