summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2009-01-19 18:22:25 +0000
committererdgeist <>2009-01-19 18:22:25 +0000
commitb019607ba543ed2b7a689aeb5da7e59aac5402e1 (patch)
tree8afe6bc0662d4569d2b78fa97e33378d4e110b6c
parent2d3718151d4f4248618f5c9f3ea5765f91f39eef (diff)
Limit comparison of strings to the length of the shorter string
-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 721dd44..2648d62 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( !memcmp( keywords->key, deststring, match_length ) && !keywords->key[match_length] ) 78 if( !strncmp( keywords->key, deststring, match_length ) )
79 return keywords->value; 79 return keywords->value;
80 keywords++; 80 keywords++;
81 } 81 }