Applied patch from Larry Doolittle to remove some strlen calls, and add one