Endless loop with sylpheed

James Lee <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <[email protected]>
Hello,

There is a problem aspell-0.60.2 when running with sylpheed-claws-1.0.0.
When opening the edit window for the first time it gets stuck in an
endless loop.  Sending it signal abort shows it gets stuck in this loop
in lib/find_speller.cpp, in function void BetterVariety::set_cur_rank():

        for (; *c != '\0'; c += p) {
          ++num;
          p = strcspn(c, "-");
          if (p == s && memcmp(m, c, s) == 0) {match = true; break;}
        }

The problem is when c has a '-' p is not incremented because on
subsequent loops c begins with '-' and p is zero.  The hyphen is in the
dictionary name and using dictionaries without variants avoids the
problem.

I think aspell should step over the hyphen as well as the chars matched
by strcspn(), for example, changing the first line thus allows it to
run:
        for (; *c != '\0'; c += p + 1) {

I've no idea what that does to the intent of the program, the above is
not supposed to be the solution but merely a hint at the problem.


James.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.