Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash in AffixMgr::suffix_check #496

Closed
aspell-helper opened this issue Jan 25, 2012 · 1 comment
Closed

crash in AffixMgr::suffix_check #496

aspell-helper opened this issue Jan 25, 2012 · 1 comment

Comments

@aspell-helper
Copy link
Collaborator

Andriy Gapon <agapon@sf> created a bug report on 2012-01-25 17:57:43 UTC
(Orig. from https://sourceforge.net/p/aspell/bugs/256)

Many people report a crash in AffixMgr::suffix_check.
Examples:
http://code.google.com/p/psi-dev/issues/detail?id=396
https://bugs.kde.org/show_bug.cgi?id=233026

I have run into a similar crash (using aspell in xchat) myself.
My debugging shows that the problem seems to be that a zero-length value of the word parameter doesn't get handled by the first loop (starting at sStart[0]).
The code after the loop is not equipped to deal with a zero length word correctly. E.g.:
byte sp = *((const byte *)(word + word.size() - 1));

The attached work-around prevents the crash, but I am not familiar enough with the code to be sure what the root cause is and, thus, that the patch is sufficiently correct.

I am using aspell-0.60.6.1 built via the FreeBSD ports.

@aspell-helper
Copy link
Collaborator Author

Andriy Gapon <agapon@sf> commented on 2012-01-25 17:57:49 UTC

The patch/workaround.
affix.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants