Fix CVE-2013-6487: a possible buffer overflow when parsing HTTP response