Fix CVE-2014-3146, CVE-2014-3775
Merge pull request #637 from pyhalov/recent-cves

Fix CVE-2014-3146, CVE-2014-3775