[Digikam-devel] [digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Andreas K. Huettel dilfridge at gentoo.org
Sun May 5 21:25:23 BST 2013


Andreas K. Huettel <dilfridge at gentoo.org> changed:

           What    |Removed                     |Added
                 CC|                            |digikam-devel at kde.org

--- Comment #3 from Andreas K. Huettel <dilfridge at gentoo.org> ---
>From the Gentoo bug report:

--- Comment #8 from John Bowler <jbowler##acm.org> ---
ICC profiles are required to have a length which is a multiple of 4, so the
profile in question is broken.  (See 7.1.2(c) in the spec and "NOTE 1" that
follows it then read 7.2.2 - the length includes the pad bytes.)

I believe there was (and maybe is) an app that was writing text strings at the
end of the profile and, if the text string was not a multiple of 4 in length,
it would produce a bad profile.  Those profiles are easy to fix - just pad the
string with \0 - but other bugs where the profile length is calculated wrong
may result in serious errors.  (libpng does go on to validate the length, but
when the length is detectably broken at the start it simply rejects the

This is a benign error on read and the profile will be ignored (along with any
other colorspace information in the PNG) but on write it gets converted into an
application error - we don't want to write PNGs with detectably broken
profiles, something else may crash!

The KDE upstream need to fix the profile, it should be easy.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Digikam-devel mailing list