Commit fa83a8e
committed
Fix new conversion filter for HTML entities
While fuzzing the new mb_decode_numericentity implementation, I discovered
that the fast conversion filter for 'HTML-ENTITIES' did not correctly
handle an empty named entity ('&;'), nor did it correctly handle
invalid named entities whose names were a prefix of a valid entity.
Also, it did not correctly handle the case where a named entity is
truncated and another named entity starts abruptly.1 parent 9c3972f commit fa83a8e
File tree
2 files changed
+16
-5
lines changed- ext/mbstring
- libmbfl/filters
- tests
2 files changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
| |||
345 | 350 | | |
346 | 351 | | |
347 | 352 | | |
348 | | - | |
| 353 | + | |
349 | 354 | | |
350 | | - | |
| 355 | + | |
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
| |||
390 | 395 | | |
391 | 396 | | |
392 | 397 | | |
393 | | - | |
| 398 | + | |
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
397 | | - | |
| 402 | + | |
398 | 403 | | |
399 | 404 | | |
400 | 405 | | |
| |||
409 | 414 | | |
410 | 415 | | |
411 | 416 | | |
412 | | - | |
| 417 | + | |
413 | 418 | | |
414 | 419 | | |
415 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
0 commit comments