Re: nepomukstrigiservice segfault (was: KDE Software Compilation 4.6.1 has been uploaded to qt-kde.debian.net)
On Sunday 03 April 2011, Sune Vuorela wrote:
> On 2011-04-03, Michael Schuerig <michael@schuerig.de> wrote:
> > nepomukstrigiservice has been happily indexing for 25 minutes now,
> > 21 more than before.
>
> What kind of changes did you do to the code?
I just removed the (char) cast. I.e.
decodeQuotedPrintable(q2, (char)(end-q2))
becomes
decodeQuotedPrintable(q2, end-q2)
> > 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.
>
> I just talked with upstream. He would really like to see the file
> that made you hit this thing.
It was this single line from a mail header
Subject:
=?utf-8?Q?Re:_Artikel_verkauft_=2D_Bitte_jetzt_verschicken_=2D_[2403_FANT=0A_EC_DB=2D228US=2D1_Geh=C3=A4use_2_=C2=BD_1_=0A_Laufwerk_USB2.0_Schwarz_=281=29]?=
The notable thing about it is that it is quite a bit longer than 127
characters. See below if you need more convincing.
Michael
#include <limits.h>
#include <stdio.h>
int main(void)
{
printf("CHAR_MAX: %d\n", CHAR_MAX);
printf("Proper: %lu\n", (unsigned long)(CHAR_MAX + 1));
printf("Overflow: %lu\n", (unsigned long)(char)(CHAR_MAX + 1));
printf("Negative: %lu\n", (unsigned long)(char)-(CHAR_MAX + 1));
}
prints on a 64bit system
CHAR_MAX: 127
Proper: 128
Overflow: 18446744073709551488
Negative: 18446744073709551488
--
Michael Schuerig
mailto:michael@schuerig.de
http://www.schuerig.de/michael/
Reply to: