[Digikam-devel] [Bug 307602] Large TIFF files crash digiKam (>1Gb)

Gilles Caulier caulier.gilles at gmail.com
Thu Oct 11 13:26:40 BST 2012


https://bugs.kde.org/show_bug.cgi?id=307602

--- Comment #12 from Gilles Caulier <caulier.gilles at gmail.com> ---
Marcel,

The crash appears when data are read from tiff and Red and Blue channels are
switched :

                uchar* stripPtr = (uchar*)(strip.data());
                uchar* dataPtr  = (uchar*)(data.data() + offset);
                uchar* p;

                // Reverse red and blue

                for (int i = 0; i < pixelsRead; ++i)
                {
                    p = dataPtr;

                    p[2] = *stripPtr++;              // <========== CRASh here
!
                    p[1] = *stripPtr++;
                    p[0] = *stripPtr++;
                    p[3] = *stripPtr++;

                    dataPtr += 4;
                }

Why ?

Note : If i want to display image with ImageMagick, it crash too !!!


[gilles at localhost core (master)]$ gdb --args display
"/mnt/data/photos/TESTS/Alex Krebs/DSC_4052-DSC_40630004.tif"
GNU gdb (GDB) 7.3.50.20110722-4.mga2 (Mageia release 2)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/display...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/display /mnt/data/photos/TESTS/Alex\
Krebs/DSC_4052-DSC_40630004.tif
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGBUS, Bus error.
0x00007ffff7a533e0 in SetImageBackgroundColor () from
/usr/lib64/libMagickCore.so.5
(gdb) bt
#0  0x00007ffff7a533e0 in SetImageBackgroundColor () from
/usr/lib64/libMagickCore.so.5
#1  0x00007ffc5168cff6 in ?? () from
/usr/lib64/ImageMagick-6.7.5/modules-Q16/coders/pattern.so
#2  0x00007ffff79d3590 in ReadImage () from /usr/lib64/libMagickCore.so.5
#3  0x00007ffff7b04dd2 in ?? () from /usr/lib64/libMagickCore.so.5
#4  0x00007ffff7b0e70c in XMakeImage () from /usr/lib64/libMagickCore.so.5
#5  0x00007ffff79f9847 in XDisplayImage () from /usr/lib64/libMagickCore.so.5
#6  0x00007ffff76a5810 in DisplayImageCommand () from
/usr/lib64/libMagickWand.so.5
#7  0x00007ffff76f06a1 in MagickCommandGenesis () from
/usr/lib64/libMagickWand.so.5
#8  0x00000000004007e9 in ?? ()
#9  0x00007ffff70be32d in __libc_start_main () from /lib64/libc.so.6
#10 0x0000000000400839 in ?? ()
#11 0x00007fffffffda68 in ?? ()
#12 0x000000000000001c in ?? ()
#13 0x0000000000000002 in ?? ()
#14 0x00007fffffffdedf in ?? ()
#15 0x00007fffffffdef0 in ?? ()
#16 0x0000000000000000 in ?? ()

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list