On Thu, Mar 08, 2007 at 10:59:33PM +0100, Daniel Kobras wrote:
> --- a/coders/sun.c    Thu Mar 08 21:13:15 2007 +0100
> +++ b/coders/sun.c    Thu Mar 08 22:51:13 2007 +0100

After applying this patch, some tests fail at least on amd64:

------------------------------------------------------------
./rwfile ./input_gray.miff RAS
Magick: Improper image header (out_1.RAS).
./rwfile ./input_256c.miff RAS
Magick: Improper image header (out_1.RAS).
./rwfile ./input_truecolor.miff RAS
Magick: Improper image header (out_1.RAS).
[...]
./rwfile ./input_gray.miff SUN
Magick: Improper image header (out_1.SUN).
./rwfile ./input_256c.miff SUN
Magick: Improper image header (out_1.SUN).
./rwfile ./input_truecolor.miff SUN
Magick: Improper image header (out_1.SUN).
------------------------------------------------------------

bytes_per_line seems to be wrong:

------------------------------------------------------------
$ ../rungm.sh gdb --args .libs/rwfile ./input_gray.miff SUN
[...]
(gdb) b sun.c:433
Breakpoint 2 at 0x2b5ebaab27f8: file sun.c, line 433.
(gdb) b sun.c:457
Breakpoint 3 at 0x2b5ebaab2a75: file sun.c, line 457.
[...]
Breakpoint 2, ReadSUNImage (image_info=0x50e5c0, exception=0x7ffff034da30) at 
sun.c:433
433                 
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
(gdb) bt
#0  ReadSUNImage (image_info=0x50e5c0, exception=0x7ffff034da30) at sun.c:433
#1  0x00002b5eba929795 in ReadImage (image_info=0x50c470, 
exception=0x7ffff034da30) at constitute.c:2748
#2  0x00000000004016c4 in main (argc=3, argv=0x7ffff034f418) at rwfile.c:219
(gdb) l
428         else
429           if (image->storage_class == PseudoClass)
430             {
431               unsigned long n = 
image->rows*(image->columns+image->columns%2);
432               if (n < bytes_per_line*image->rows)
433                 
ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
434               for (y=0; y < (long) image->rows; y++)
435               {
436                 q=SetImagePixels(image,0,y,image->columns,1);
437                 if (q == (PixelPacket *) NULL)
(gdb) print n
$1 = 3220
(gdb) print bytes_per_line
$2 = 4294967296
(gdb) print image->rows
$3 = 46
------------------------------------------------------------

        Sami

Attachment: signature.asc
Description: Digital signature

Reply via email to