From 60b0b18ef81c27361589ba3253d5cdff3b539e53 Mon Sep 17 00:00:00 2001 From: Krispy Date: Tue, 29 Nov 2022 23:43:15 -0500 Subject: [PATCH] fix(Tier1): Fixed bug in CCommand constructor that could append junk to the command string See ValveSoftware/source-sdk-2013#434 --- mp/src/tier1/convar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mp/src/tier1/convar.cpp b/mp/src/tier1/convar.cpp index 80962d90cc..23c374bc4e 100644 --- a/mp/src/tier1/convar.cpp +++ b/mp/src/tier1/convar.cpp @@ -359,7 +359,7 @@ CCommand::CCommand( int nArgC, const char **ppArgV ) { *pSBuf++ = '\"'; } - memcpy( pSBuf, ppArgV[i], nLen ); + memcpy( pSBuf, ppArgV[i], nLen+1 ); pSBuf += nLen; if ( bContainsSpace ) {