The load_tile function in the XCF coder in coders/xcf.c in (1) ImageMagick 6.2.8-0 and (2) GraphicsMagick (aka gm) 1.1.7 allows user-assisted remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a crafted .xcf file that triggers an out-of-bounds heap write, possibly related to the ScaleCharToQuantum function.
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10843
https://exchange.xforce.ibmcloud.com/vulnerabilities/41194
http://www.ubuntu.com/usn/USN-681-1
http://www.securitytracker.com/id?1019880
http://www.securityfocus.com/bid/28821
http://www.redhat.com/support/errata/RHSA-2008-0145.html
http://www.mandriva.com/security/advisories?name=MDVSA-2008:099
http://www.debian.org/security/2009/dsa-1858
http://secunia.com/advisories/36260
http://secunia.com/advisories/32945
http://secunia.com/advisories/30967
http://secunia.com/advisories/29786
http://lists.opensuse.org/opensuse-security-announce/2008-07/msg00001.html