[SECURITY FIX] Fix CVE-2014-3483 and protect against CVE-2014-3482