mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
Fix seg fault for empty ENV{} call bug #9747
This commit is contained in:
@@ -65,7 +65,11 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||
if ( !key )
|
||||
{
|
||||
return this->ExpandVariable(var);
|
||||
}
|
||||
}
|
||||
if(!var)
|
||||
{
|
||||
return this->EmptyVariable;
|
||||
}
|
||||
if ( strcmp(key, "ENV") == 0 )
|
||||
{
|
||||
char *ptr = getenv(var);
|
||||
|
||||
Reference in New Issue
Block a user