This fixes a hostname check bypassing vulnerability (truncation on NULL-bytes, as seen in other implementations) (CVE-2013-4314)