[Digikam-devel] [digikam] [Bug 359949] Bad canon raw file makes digikam to crash at startup

via KDE Bugzilla bugzilla_noreply at kde.org
Wed Mar 2 06:04:05 GMT 2016


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

caulier.gilles at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |UPSTREAM
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |caulier.gilles at gmail.com

--- Comment #1 from caulier.gilles at gmail.com ---
Reproducible with 5.0.0.

The crash is in Exiv2 shared library :

Thread 1 (Thread 0x7f54e39bda40 (LWP 10870)):
[KCrash Handler]
#6  0x00007f55098f1718 in Exiv2::getUShort(unsigned char const*,
Exiv2::ByteOrder) (buf=buf at entry=0x7f55d4019019 <error: Cannot access memory at
address 0x7f55d4019019>, byteOrder=byteOrder at entry=Exiv2::littleEndian) at
types.cpp:236
#7  0x00007f5509855fc4 in
Exiv2::Internal::CiffDirectory::readDirectory(unsigned char const*, unsigned
int, Exiv2::ByteOrder) (this=0x1d89e90, pData=0x7f54d401901a "", size=1277926,
byteOrder=Exiv2::littleEndian) at crwimage.cpp:452
#8  0x00007f5509856327 in Exiv2::Internal::CiffHeader::read(unsigned char
const*, unsigned int) (this=this at entry=0x1d89e60,
pData=pData at entry=0x7f54d4019000 "II\032", size=size at entry=1277952) at
crwimage.cpp:391
#9  0x00007f5509856481 in Exiv2::CrwParser::decode(Exiv2::CrwImage*, unsigned
char const*, unsigned int) (pCrwImage=pCrwImage at entry=0x1d89d90,
pData=0x7f54d4019000 "II\032", size=size at entry=1277952) at crwimage.cpp:177
#10 0x00007f55098566cd in Exiv2::CrwImage::readMetadata() (this=0x1d89d90) at
crwimage.cpp:134
#11 0x00007f550cf59e75 in Digikam::MetaEngine::load(QString const&) const
(this=0x7ffc08993850, filePath=...) at
/home/gilles/Devel/5.x/core/libs/dmetadata/metaengine.cpp:283
#12 0x00007f550cf95237 in Digikam::DMetadata::load(QString const&) const
(this=0x7ffc08993850, filePath=...) at
/home/gilles/Devel/5.x/core/libs/dmetadata/dmetadata.cpp:100
#13 0x0000000000453021 in ShowFoto::ShowFoto::openUrls(QList<QUrl> const&)
(this=0x16fcba0, urls=...) at
/home/gilles/Devel/5.x/core/showfoto/main/showfoto.cpp:526
#14 0x0000000000457b0a in ShowFoto::ShowFoto::slotDroppedUrls(QList<QUrl>
const&) (this=0x16fcba0, droppedUrls=...) at
/home/gilles/Devel/5.x/core/showfoto/main/showfoto.cpp:1282
#15 0x0000000000450107 in ShowFoto::ShowFoto::ShowFoto(QList<QUrl> const&)
(this=0x16fcba0, urlList=..., __in_chrg=<optimized out>, __vtt_parm=<optimized
out>) at /home/gilles/Devel/5.x/core/showfoto/main/showfoto.cpp:202
#16 0x000000000044e816 in main(int, char**) (argc=2, argv=0x7ffc08993f58) at
/home/gilles/Devel/5.x/core/showfoto/main/main.cpp:86

In fact digiKam handle all exception from Exiv2 already, since a long. Exiv2 in
case of corrupted file must take a care about this problematic case, and
generate a C++ exception instead to crash.

It's also reproducible directly with Exiv2 CLI tool :

[gilles at localhost BugDigikamRaw]$ exiv2 --version
exiv2 0.25 001900 (64 bit build)
Copyright (C) 2004-2015 Andreas Huggel.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
[gilles at localhost BugDigikamRaw]$ exiv2 -v crw_3888.crw 
File 1/1: crw_3888.crw
Segmentation fault (core dumped)
[gilles at localhost BugDigikamRaw]$ 

Report this problem as UPSTREAM to Exiv2 bugzilla with link to CR2 files to
download.

Gilles Caulier

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



More information about the Digikam-devel mailing list