]> Git Repo - linux.git/commit - lib/ts_bm.c
textsearch: fix Boyer-Moore text search bug
authorJoonwoo Park <[email protected]>
Mon, 30 Jun 2008 19:42:23 +0000 (12:42 -0700)
committerDavid S. Miller <[email protected]>
Mon, 30 Jun 2008 19:42:23 +0000 (12:42 -0700)
commitaebb6a849cfe7d89bcacaaecc20a480dfc1180e7
tree6a7cf5c6bdc80c75ec843d8ee44cd98039ca6fd7
parent84ebe1cdae56707b9aa1b40ae5aa7d817ba745f5
textsearch: fix Boyer-Moore text search bug

The current logic has a bug which cannot find matching pattern, if the
pattern is matched from the first character of target string.
for example:
pattern=abc, string=abcdefg
pattern=a,   string=abcdefg
Searching algorithm should return 0 for those things.

Signed-off-by: Joonwoo Park <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
lib/ts_bm.c
This page took 0.05872 seconds and 4 git commands to generate.