Fixes CVE-2014-7829
Fixes CVE-2014-7819
Merge pull request #547 from ChrisBr/fix_cve

Fix several CVE