[Digikam-devel] [Bug 131550] digikam/showfoto can't show jpeg image under PowerPC
Marcel Wiesweg
marcel.wiesweg at gmx.de
Thu Aug 3 22:53:33 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=131550
------- Additional Comments From marcel.wiesweg gmx de 2006-08-03 23:53 -------
SVN commit 569460 by mwiesweg:
Make JPEG signature checking endianness-proof
(please test)
CCBUGS: 131550
M +4 -2 jpegloader.cpp
--- trunk/extragear/graphics/digikam/libs/dimg/loaders/jpegloader.cpp #569459:569460
@ -105,7 +105,7 @
if (!file)
return false;
- unsigned short header;
+ unsigned char header[2];
if (fread(&header, 2, 1, file) != 1)
{
@ -113,7 +113,9 @
return false;
}
- if (header != 0xd8ff)
+ unsigned char jpegID[] = { 0xFF, 0xD8 };
+
+ if (memcmp(header, jpegID, 2) != 0)
{
// not a jpeg file
fclose(file);
More information about the Digikam-devel
mailing list