Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: src/hunspell/suggestmgr.cxx

Issue 11442040: Fix array-out-of-bounds error in hunspell (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/hunspell.git@master
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hunspell/suggestmgr.cxx
diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
index 76ab2032658751fd8388670e3e0a09696fdeb175..2d69290661b17335ff6db46bbc7482be2e0a83c6 100644
--- a/src/hunspell/suggestmgr.cxx
+++ b/src/hunspell/suggestmgr.cxx
@@ -845,8 +845,8 @@ int SuggestMgr::forgotchar(char ** wlst, const char * word, int ns, int cpdsugge
// error is missing a letter it needs
int SuggestMgr::forgotchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest)
{
- w_char candidate_utf[MAXSWL];
- char candidate[MAXSWUTF8L];
+ w_char candidate_utf[MAXSWL + 1];
+ char candidate[MAXSWUTF8L + 4];
groby-ooo-7-16 2012/12/12 01:19:38 does this work for 100 character pastes now? And 1
please use gerrit instead 2012/12/12 05:33:53 Words of 100 characters or more do not get passed
please use gerrit instead 2012/12/12 21:00:01 The clip of wl to be < MAXSWL happens on line 140
w_char * p;
clock_t timelimit = clock();
int timer = MINTIMER;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698