make cmndline null character terminated