[Cmake-commits] [cmake-commits] zach.mullen committed SystemInformation.cxx 1.47 1.48
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Oct 6 14:55:50 EDT 2009
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv25320
Modified Files:
SystemInformation.cxx
Log Message:
Fix bus error on mac. Was a result of not having null termination of arg list to sw_vers calls.
Index: SystemInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemInformation.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -C 2 -d -r1.47 -r1.48
*** SystemInformation.cxx 6 Oct 2009 15:46:16 -0000 1.47
--- SystemInformation.cxx 6 Oct 2009 18:55:48 -0000 1.48
***************
*** 3008,3012 ****
{
break;
! }
if(buffer[i] != '\n' && buffer[i] != '\r')
{
--- 3008,3012 ----
{
break;
! }
if(buffer[i] != '\n' && buffer[i] != '\r')
{
***************
*** 3014,3018 ****
value = buffer[i];
value += val;
! }
}
return value;
--- 3014,3018 ----
value = buffer[i];
value += val;
! }
}
return value;
***************
*** 3386,3402 ****
kwsys_stl::vector<const char*> args;
args.clear();
- args.push_back("sw_vers");
args.push_back("-productName");
output = this->RunProcess(args);
this->OSName = output;
! args.pop_back();
args.push_back("-productVersion");
output = this->RunProcess(args);
this->OSRelease = output;
! args.pop_back();
args.push_back("-buildVersion");
output = this->RunProcess(args);
this->OSVersion = output;
--- 3386,3407 ----
kwsys_stl::vector<const char*> args;
args.clear();
+ args.push_back("sw_vers");
args.push_back("-productName");
+ args.push_back(0);
output = this->RunProcess(args);
this->OSName = output;
! args.clear();
+ args.push_back("sw_vers");
args.push_back("-productVersion");
+ args.push_back(0);
output = this->RunProcess(args);
this->OSRelease = output;
! args.clear();
+ args.push_back("sw_vers");
args.push_back("-buildVersion");
+ args.push_back(0);
output = this->RunProcess(args);
this->OSVersion = output;
More information about the Cmake-commits
mailing list