mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 14:30:27 +00:00
ERR: Fix crash. We should check output before appending to it
This commit is contained in:
parent
3c832dd1b8
commit
6ab87555ea
@ -483,7 +483,10 @@ bool cmSystemTools::RunSingleCommand(
|
|||||||
{
|
{
|
||||||
std::cerr << exception_str << std::endl;
|
std::cerr << exception_str << std::endl;
|
||||||
}
|
}
|
||||||
output->append(exception_str, strlen(exception_str));
|
if ( output )
|
||||||
|
{
|
||||||
|
output->append(exception_str, strlen(exception_str));
|
||||||
|
}
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error)
|
else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error)
|
||||||
@ -493,7 +496,10 @@ bool cmSystemTools::RunSingleCommand(
|
|||||||
{
|
{
|
||||||
std::cerr << error_str << std::endl;
|
std::cerr << error_str << std::endl;
|
||||||
}
|
}
|
||||||
output->append(error_str, strlen(error_str));
|
if ( output )
|
||||||
|
{
|
||||||
|
output->append(error_str, strlen(error_str));
|
||||||
|
}
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired)
|
else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired)
|
||||||
@ -503,7 +509,10 @@ bool cmSystemTools::RunSingleCommand(
|
|||||||
{
|
{
|
||||||
std::cerr << error_str << std::endl;
|
std::cerr << error_str << std::endl;
|
||||||
}
|
}
|
||||||
output->append(error_str, strlen(error_str));
|
if ( output )
|
||||||
|
{
|
||||||
|
output->append(error_str, strlen(error_str));
|
||||||
|
}
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user