diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2006-02-02 17:15:41 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-02-02 17:15:41 -0800 |
commit | 3f330317ab4973178423aba750d6d0ca5ce0024a (patch) | |
tree | 177b1a3f213410bc526fda0cdb1b0568ea282d82 /scripts/checkincludes.pl | |
parent | f00c401b9b5f0a90e2eb05705f5988fbda0b082b (diff) |
[TEXTSEARCH]: Fix broken good shift array calculation in Boyer-Moore
The current logic does not calculate correctly the good shift array:
Let x be the pattern that is being searched. Let y be the block of data.
The good shift array aligns the segment:
x[i+1 ... m-1] = y[i+j+1 ... j+m-1]
with its rightmost occurrence in x that fulfils x[i] neq y[i+j].
In previous version, the good shift array for the pattern ANPANMAN is:
[1, 8, 3, 8, 8, 8, 8, 8]
and should be:
[1, 8, 3, 6, 6, 6, 6, 6]
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/checkincludes.pl')
0 files changed, 0 insertions, 0 deletions