Browse Source

Limit comparison of strings to the length of the shorter string

dynamic-accesslists
erdgeist 16 years ago
parent
commit
b019607ba5
  1. 2
      scan_urlencoded_query.c

2
scan_urlencoded_query.c

@ -75,7 +75,7 @@ int scan_find_keywords( const ot_keywords * keywords, char **string, SCAN_SEARCH @@ -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++;
}

Loading…
Cancel
Save