|
Evaluation
|
This problem is caused by corrupted color profile embedded into image.
Namely, this profile contains corrupted tags rTRC, gTRC, an bTRC, which
are required for a transform generation.
There is short dump of the profile header that demonstrates the corruption:
tagCount: 17
0: cprt, offset=150, size=033: type='text' (74657874)
1: desc, offset=184, size=06c: type='desc' (64657363)
2: wtpt, offset=1f0, size=014: type='XYZ ' (58595a20)
3: bkpt, offset=204, size=014: type='XYZ ' (58595a20)
4: rXYZ, offset=218, size=014: type='XYZ ' (58595a20)
5: gXYZ, offset=22c, size=014: type='XYZ ' (58595a20)
6: bXYZ, offset=240, size=014: type='XYZ ' (58595a20)
7: dmnd, offset=254, size=070: type='desc' (64657363)
8: dmdd, offset=2c4, size=088: type='desc' (64657363)
9: vued, offset=34c, size=086: type='desc' (64657363)
10: view, offset=3d4, size=024: type='view' (76696577)
11: lumi, offset=3f8, size=014: type='XYZ ' (58595a20)
12: meas, offset=40c, size=024: type='meas' (6d656173)
13: tech, offset=430, size=00c: type='☻♦♣?' (020405b4)
14: rTRC, offset=43c, size=80c: type='r╡→→' (72b51a1a)
15: gTRC, offset=43c, size=80c: type='r╡→→' (72b51a1a)
16: bTRC, offset=43c, size=80c: type='r╡→→' (72b51a1a)
Note that type signatures of tags rTRC, gTRC, and bTRC are corrupted
and contain meaningless values (btw, the technology tag seems also corrupted
but it is not used by kcms for transform generation).
It makes impossible for kacms to determine exact type of tag (which may
vary for modern profiles) and leads to transform generation failure.
Observed crash is caused by a disagreement in different levels of kcms
error handling which leads to multiple deletion of same chunk of data.
Instead of improving the error handling strategy in the kcms (that may be
unnecessary if we have some plans to upgrade the library), I suggest to
introduce small check for validity of required tags: namely we can check
whether TRC tags have types corresponded to the spec and report failure
if these types are incorrect.
Another part of the fix is related to jpeg reader. Here we introduce
a sanity check for newly created color profile: if this color space
unable to perform a simple color conversion, then we ignore it.
It allows to avoid a declaration of image types based on corrupted
color spaces and failures on processing pixel data provided by decoder.
Posted Date : 2009-06-02 09:03:40.0
|