mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-01-16 16:58:03 +03:00
Fixed bug in CCommand constructor that could append junk to the command string
* Missed copying the null terminator * Since m_pArgSBuffer is not initialized this problem can occur when the (command string buffer length) + 1 char in m_pArgSBuffer array happens to be non-zero.
This commit is contained in:
parent
0d8dceea43
commit
208068486d
@ -359,7 +359,7 @@ CCommand::CCommand( int nArgC, const char **ppArgV )
|
|||||||
{
|
{
|
||||||
*pSBuf++ = '\"';
|
*pSBuf++ = '\"';
|
||||||
}
|
}
|
||||||
memcpy( pSBuf, ppArgV[i], nLen );
|
memcpy( pSBuf, ppArgV[i], nLen+1 );
|
||||||
pSBuf += nLen;
|
pSBuf += nLen;
|
||||||
if ( bContainsSpace )
|
if ( bContainsSpace )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user