fix possibly buffer overfolow in parseSystemName and  parseParentPath