The problem can be corrected by upgrading the affected package to version 5:126.96.36.199-1ubuntu1.5 (for Ubuntu 4.10), or 6:188.8.131.52-2.1ubuntu1.1 (for Ubuntu 5.04). In general, a standard system upgrade is sufficient to effect the necessary changes.
Damian Put discovered a buffer overflow in the PNM image decoder. Processing a specially crafted PNM file with a small "colors" value resulted in a crash of the application that used the ImageMagick library. (CAN-2005-1275)
Another Denial of Service vulnerability was found in the XWD decoder. Specially crafted invalid color masks resulted in an infinite loop which caused the application using the ImageMagick library to stop working and use all available CPU resources. (http://bugs.gentoo.org/show_bug.cgi?id=90423)