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

possible bug in hyphen.c, when using Turkish dictionary #20

Open
aloistr opened this issue Feb 1, 2021 · 1 comment
Open

possible bug in hyphen.c, when using Turkish dictionary #20

aloistr opened this issue Feb 1, 2021 · 1 comment

Comments

@aloistr
Copy link

aloistr commented Feb 1, 2021

in hyphen.c line 869 offset = i + 1 - strlen (match);
I arrive with offset = -1;
This damages the alloc memory in line 888: matchrepl[offset + k] = repl;
because it writes to matchrepl[-1]
That leads later to a crash when free() is called.
I have fixed the problem by adding line 870: if (offset < 0) offset = 0;
but I am nor sure this is save.

The problem appears when I use a Turkish dictionary, and the error may caused by bad data in
the dictionary hyph_tr.dic from
https://github.com/Slyneth/hunspell-hyphenation-turkish

@bfabiszewski
Copy link
Contributor

I believe this bug has already been fixed in 73dd296, but it was never released. Try using latest git version.

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

No branches or pull requests

2 participants