From b019607ba543ed2b7a689aeb5da7e59aac5402e1 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Mon, 19 Jan 2009 18:22:25 +0000 Subject: Limit comparison of strings to the length of the shorter string --- scan_urlencoded_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scan_urlencoded_query.c') 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 if( match_length == 0 ) return -3; while( keywords->key ) { - if( !memcmp( keywords->key, deststring, match_length ) && !keywords->key[match_length] ) + if( !strncmp( keywords->key, deststring, match_length ) ) return keywords->value; keywords++; } -- cgit v1.2.3