[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nepomukstrigiservice segfault (was: KDE Software Compilation 4.6.1 has been uploaded to qt-kde.debian.net)



On Sunday 03 April 2011, Michael Schuerig wrote:
> I'll give it a try tomorrow to debug into it.

I think I found the cause. In 
strigi-0.7.2/src/streams/mailinputstream.cpp, line 178, there is a bad 
cast to char. decodeQuotedPrintable expects uint32_t in that position.

    } else if (*q1 == 'q' || *q1 =='Q') {
        string& str(decodeQuotedPrintable(q2, (char)(end-q2)));
        if (strncasecmp("utf-8", s, 5) != 0) {

When, as apparently in my case, end - q2 is greater than 128, it is cast 
to a negative (signed) char. Which in turn when promoted to uint32_t is 
interpreted as a slightly below 2^32. (Incidentally, at the point of 
crash the process at a virtual memory size of 4.5GB, mostly reserved for 
a string taking the decoded header.)

nepomukstrigiservice has been happily indexing for 25 minutes now, 21 
more than before.

I haven't yet reported this bug at strigi.sf.net, as sourceforge appears 
to be down right now. It would be nice to have a patch in the debian 
package soon, even before a new upstream is released.

Michael

-- 
Michael Schuerig
mailto:michael@schuerig.de
http://www.schuerig.de/michael/


Reply to: