Integer overflow in the ReadSGIImage function in sgi.c in ImageMagick before 6.2.9 allows user-assisted attackers to cause a denial of service (crash) and possibly execute arbitrary code via large (1) bytesperpixel, (2) columns, and (3) rows values, which trigger a heap-based buffer overflow.