Change 205077565 by lbaudoin@lbaudoin:hunspell3:7918:citc on 2018/07/18 07:48:28

	Fix a buffer overflow in hunspell.
	
	PRESUBMIT=passed
	BUG=62755495
	FIXED=62755495
	R=shine
	CC=gmail-security+reviews,jduart,weihaw
	APPROVED=shine
	REQUIRED_REVIEW=1
	DELTA_BY_EXTENSION=cxx=12
	OCL=204916935

Affected files ...

... //depot//src/hunspell/suggestmgr.cxx#5 edit
... //depot//testdata/poc-e70b6035dbc764fd241582c5f013edd783749a6ef4e8f653501e2a687c118cb0-180711063041634658#1 add

==== //depot//src/hunspell/suggestmgr.cxx#4 - /google/src/files/205077565/depot//src/hunspell/suggestmgr.cxx ====
--- /google/src/files/151456944/depot//src/hunspell/suggestmgr.cxx	2017-03-28 12:13:02.000000000 -0400
+++ /google/src/files/205077565/depot//src/hunspell/suggestmgr.cxx	2018-07-18 10:48:28.000000000 -0400
@@ -712,16 +712,21 @@
    w_char * p;
    clock_t timelimit = clock();
    int timer = MINTIMER;
+   if (wl > MAXSWL || wl < 0) {
+     return -1;
+   }
    // try inserting a tryme character at the end of the word and before every letter
    for (int i = 0;  i < ctryl;  i++) {
       memcpy (candidate_utf, word, wl * sizeof(w_char));
-      for (p = candidate_utf + wl;  p >= candidate_utf; p--)  {
-         *(p + 1) = *p;
-         *p = ctry_utf[i];
-         u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl + 1);
-         ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer, &timelimit);
-         if (ns == -1) return -1;
-         if (!timer) return ns;
+      for (p = candidate_utf + wl;
+           p >= candidate_utf && p < candidate_utf + MAXSWL - 1; p--) {
+        *(p + 1) = *p;
+        *p = ctry_utf[i];
+        u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl + 1);
+        ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer,
+                     &timelimit);
+        if (ns == -1) return -1;
+        if (!timer) return ns;
       }
    }
    return ns;
==== //depot//testdata/poc-e70b6035dbc764fd241582c5f013edd783749a6ef4e8f653501e2a687c118cb0-180711063041634658 - /google/src/files/205077565/depot//testdata/poc-e70b6035dbc764fd241582c5f013edd783749a6ef4e8f653501e2a687c118cb0-180711063041634658 ==== (binary)
(... files differ ...)
