- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb3e0509
committed
Fix not-terribly-safe coding in NIImportOOAffixes() and NIImportAffixes().
There were two places in spell.c that supposed that they could searchfor a location in a string produced by lowerstr() and then transposethe offset into the original string. But this fails completely iflowerstr() transforms any characters into characters of different bytelength, as can happen in Turkish UTF8 for instance.We'd added some comments about this coding in commit51e78ab,but failed to realize that it was not merely confusing but wrong.Coverity complained about this code years ago, but in such an opaquefashion that nobody understood what it was on about. I'm not entirelysure that this issue *is* what it's on about, actually, but perhapsthis patch will shut it up -- and in any case the problem is clear.Back-patch to all supported branches.1 parentcb0ca0c commitb3e0509
1 file changed
+19
-13
lines changedLines changed: 19 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
222 | 235 |
| |
223 | 236 |
| |
224 | 237 |
| |
| |||
1262 | 1275 |
| |
1263 | 1276 |
| |
1264 | 1277 |
| |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1265 | 1282 |
| |
1266 |
| - | |
1267 | 1283 |
| |
1268 |
| - | |
1269 |
| - | |
1270 |
| - | |
1271 |
| - | |
1272 |
| - | |
1273 | 1284 |
| |
1274 |
| - | |
1275 |
| - | |
1276 |
| - | |
1277 | 1285 |
| |
1278 | 1286 |
| |
1279 | 1287 |
| |
| |||
1343 | 1351 |
| |
1344 | 1352 |
| |
1345 | 1353 |
| |
1346 |
| - | |
1347 |
| - | |
| 1354 | + | |
| 1355 | + | |
1348 | 1356 |
| |
1349 | 1357 |
| |
1350 |
| - | |
1351 |
| - | |
1352 | 1358 |
| |
1353 | 1359 |
| |
1354 | 1360 |
| |
|
0 commit comments
Comments
(0)