Multiple integer overflows in libXpm before 3.5.12, when a program requests parsing XPM extensions on a 64-bit platform, allow remote attackers to cause a denial of service (out-of-bounds write) or execute arbitrary code via (1) the number of extensions or (2) their concatenated length in a crafted XPM file, which triggers a heap-based buffer overflow.
https://security.gentoo.org/glsa/201701-72
https://lists.freedesktop.org/archives/xorg/2016-December/058537.html
https://cgit.freedesktop.org/xorg/lib/libXpm/commit/?id=d1167418f0fd02a27f617ec5afd6db053afbe185
https://access.redhat.com/errata/RHSA-2017:1865
http://www.securityfocus.com/bid/95785
http://www.openwall.com/lists/oss-security/2017/01/25/7