Fix a bug in path command where PATH variable could never be read if it was bigger than ENV_BUFFER_SIZE

svn path=/trunk/; revision=58703
This commit is contained in:
Pierre Schweitzer 2013-04-07 08:53:37 +00:00
parent 6662f375d1
commit 06b3d2634d

View file

@ -61,7 +61,7 @@ INT cmd_path (LPTSTR param)
else if (dwBuffer > ENV_BUFFER_SIZE)
{
pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR));
GetEnvironmentVariable (_T("PATH"), pszBuffer, ENV_BUFFER_SIZE);
GetEnvironmentVariable (_T("PATH"), pszBuffer, dwBuffer);
}
ConOutPrintf (_T("PATH=%s\n"), pszBuffer);