Refactor CVE-2014-6271