summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2009-01-26 10:33:46 +0000
committererdgeist <>2009-01-26 10:33:46 +0000
commit1d821b95cb922fadb3b5c4d71f437700f840990a (patch)
treec59d093b63948fba42f344c0afc340513c8f9955
parentde5dbad258a076b53fa7dea78b233be3250110bc (diff)
Lot of Gehacktes around this keyword scanner. Don't return a match if string to compare is shorter than key from table.
-rw-r--r--scan_urlencoded_query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scan_urlencoded_query.c b/scan_urlencoded_query.c
index 2648d62..a4f89c2 100644
--- a/scan_urlencoded_query.c
+++ b/scan_urlencoded_query.c
@@ -75,7 +75,7 @@ int scan_find_keywords( const ot_keywords * keywords, char **string, SCAN_SEARCH
75 if( match_length == 0 ) return -3; 75 if( match_length == 0 ) return -3;
76 76
77 while( keywords->key ) { 77 while( keywords->key ) {
78 if( !strncmp( keywords->key, deststring, match_length ) ) 78 if( !strncmp( keywords->key, deststring, match_length ) && !keywords->key[match_length] )
79 return keywords->value; 79 return keywords->value;
80 keywords++; 80 keywords++;
81 } 81 }