[QScintilla] Bug in Scintilla: what to do ?

Phil Thompson phil at riverbankcomputing.com
Tue Dec 11 11:43:32 GMT 2007


On Tuesday 11 December 2007, Xavier Noëlle wrote:
> Hi,
> I was trying to use WordList and didn't understand why the hell my
> test 'wordList.InList ("toto")' was giving me random results.
> I searched into the Scintilla code and discovered this piece of code
> (PropSet.cpp, in the InList method):
>
> const char *a = words[j] + 1;
> const char *b = s;
>
> while (*a && *a == *b) {
> 	a++;
> 	b++;
> }
>
> if (*a)
> {
>   return true;
> }
>
> which obviously goes wrong if a is shorter than b or even empty...
>
> This gives me two questions:
> - why does not Scintilla use standard things for strings (strcmp or
> even strncmp would have been more reliable in this place) ? (but
> that's more of a rhetorical question)
> - what should I do in this case, concerning the "bundle" Scintilla +
> QScintilla ? How are they linked together and what is the good way to
> correct this ?

Any bugs in the Scintilla code should be reported to the Scintilla project.

Phil



More information about the QScintilla mailing list