- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitd6e37b3
committed
Cope with more than 64K phrases in a thesaurus dictionary.
dict_thesaurus stored phrase IDs in uint16 fields, so it would get confusedand even crash if there were more than 64K entries in the configurationfile. It turns out to be basically free to widen the phrase IDs to uint32,so let's just do so.This was complained of some time ago by David Boutin (in bug #7793);he later submitted an informal patch but it was never acted on.We now have another complaint (bug #11901 from Luc Ouellette) so it'stime to make something happen.This is basically Boutin's patch, but for future-proofing I also added adefense against too many words per phrase. Note that we don't need anyexplicit defense against overflow of the uint32 counters, since before thathappens we'd hit array allocation sizes that repalloc rejects.Back-patch to all supported branches because of the crash risk.1 parent4875931 commitd6e37b3
1 file changed
+17
-8
lines changedLines changed: 17 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
105 |
| - | |
| 105 | + | |
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
147 | 146 |
| |
148 | 147 |
| |
149 | 148 |
| |
| |||
168 | 167 |
| |
169 | 168 |
| |
170 | 169 |
| |
171 |
| - | |
| 170 | + | |
172 | 171 |
| |
173 | 172 |
| |
174 | 173 |
| |
| |||
184 | 183 |
| |
185 | 184 |
| |
186 | 185 |
| |
187 |
| - | |
188 |
| - | |
| 186 | + | |
| 187 | + | |
189 | 188 |
| |
190 | 189 |
| |
191 | 190 |
| |
| |||
286 | 285 |
| |
287 | 286 |
| |
288 | 287 |
| |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
289 | 298 |
| |
290 | 299 |
| |
291 | 300 |
| |
| |||
670 | 679 |
| |
671 | 680 |
| |
672 | 681 |
| |
673 |
| - | |
| 682 | + | |
674 | 683 |
| |
675 | 684 |
| |
676 | 685 |
| |
|
0 commit comments
Comments
(0)