Fix coverity: Some Reverts

When taking over the the fixes I did not check every usage of sizeof, using sizeof the ptr is of course bs when the strlen is of interest.