Share

Little cms color engine

Tracker: Bugs

5 lcms returns invalid productName, causes ufraw to segfault - ID: 2828410
Last Update: Settings changed ( mm2 )

LCMS returns some kind of garbage in place of productName when reading this
ICC profile - http://netprint.ru/images/846.zip, this causes segfault in
UFRaw.
The profile itself is probably borked, but nevertheless it would be good
not to crash in such cases.
The problem seems to be somewhere around src/cmsio1.c:1650 - wcstombs()
somehow returns something that is not a valid Unicode, but doesn't report
any errors in the same time.

Valgrind also reports several uninitialized reads, which can be fixed with
simple memset(wchar, .., ..).
Btw, wchar allocation also looks weird to me:
wchar = (wchar_t*) _cmsMalloc(Len*sizeof(wchar_t) + 2);
shouldn't it be
wchar = (wchar_t*) _cmsMalloc((Len+1)*sizeof(wchar_t));
instead?

Let me know if you need any additional info, I'd be glad to provide any
help needed.


Antony Dovgal ( tony2001 ) - 2009-07-28 14:29

5

Open

Accepted

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2009-07-30 10:26
Sender: mm2Project Admin

Thanks for reporting. This is fixed in 2.0 (a full rewrite of unicode
part). Probably I will make a 1.19 to deal with issues like that on the
1.xx branch. Thanks again


Log in to comment.

Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
resolution_id None 2009-07-30 10:26 mm2