fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / hunspell / hunspell-morph-overflow.patch
blobfe7c4f72530de18b5bc109be79ae2927120bdf97
1 --- hunspell/src/hunspell/affixmgr.cxx 2014-09-24 16:11:10.750421303 +0200
2 +++ build/hunspell/src/hunspell/affixmgr.cxx 2014-09-26 15:25:09.448688908 +0200
3 @@ -2400,8 +2400,10 @@
5 mystrcat(*result, presult, MAXLNLEN);
6 if (m || (*m != '\0')) {
7 - sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD,
8 + char m2[MAXLNLEN];
9 + sprintf(m2, "%c%s%s%s", MSEP_FLD,
10 MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC));
11 + mystrcat(*result, m2, MAXLNLEN);
13 if (m) free(m);
14 mystrcat(*result, "\n", MAXLNLEN);
15 @@ -2481,11 +2483,13 @@
17 mystrcat(*result, presult, MAXLNLEN);
18 if (m && (*m != '\0')) {
19 - sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD,
20 + char m2[MAXLNLEN];
21 + sprintf(m2, "%c%s%s%s", MSEP_FLD,
22 MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC));
23 + mystrcat(*result, m2, MAXLNLEN);
25 if (m) free(m);
26 - sprintf(*result + strlen(*result), "%c", MSEP_REC);
27 + if (strlen(*result) + 1 < MAXLNLEN) sprintf(*result + strlen(*result), "%c", MSEP_REC);
28 ok = 1;