Commit 754f9f9
committed
Testing the handling of too long words in titles
Xapian's parser (TermGenerator) discards words/terms longer than a
certain limit (default: 64). However terms can be added to the indexed
documents directly via Xapian::Document::add_term(). We do that in order
to index titles that are made fully of non-word characters but our
implementation opens up a loophole for words of arbitrary length to slip
in (when the title is a single word). That leads to crashes if Xapian's
hard limit on the length of a term (max 245 characters) is exceeded.
The new unit test demonstrates the existence of a loophole.1 parent 9ca8eb0 commit 754f9f9
1 file changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
698 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
699 | 712 | | |
700 | 713 | | |
701 | 714 | | |
702 | 715 | | |
703 | 716 | | |
704 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
705 | 724 | | |
706 | 725 | | |
707 | 726 | | |
| |||
727 | 746 | | |
728 | 747 | | |
729 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
730 | 762 | | |
731 | 763 | | |
732 | 764 | | |
| |||
0 commit comments