CVE-2012-4409, CVE-2012-4426, CVE-2012-4527 Patches taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/app-crypt/mcrypt/files