diff -ur omniORB-4.1-20080908/src/appl/omniNames/log.cc omniORB-4.1-20080908-computernamefix/src/appl/omniNames/log.cc --- omniORB-4.1-20080908/src/appl/omniNames/log.cc 2008-01-03 21:03:15.000000000 +1100 +++ omniORB-4.1-20080908-computernamefix/src/appl/omniNames/log.cc 2008-09-10 14:39:19.385684961 +1000 @@ -233,9 +233,9 @@ // Get host name: - DWORD machineName_len = MAX_COMPUTERNAME_LENGTH; - CORBA::String_var machineName = CORBA::string_alloc(machineName_len); - if (!GetComputerName((LPTSTR)(char*)machineName, &machineName_len)) { + DWORD machineName_buflen = MAX_COMPUTERNAME_LENGTH+1; + CORBA::String_var machineName = CORBA::string_alloc(machineName_buflen-1); + if (!GetComputerName((LPTSTR)(char*)machineName, &machineName_buflen)) { cerr << ts.t() << "Error: cannot get the name of this host." << endl; exit(1); }