memset to zero so we can search for \0 safely