mirror of
git://erdgeist.org/opentracker
synced 2025-02-16 22:21:30 +08:00
Limit comparison of strings to the length of the shorter string
This commit is contained in:
parent
2d3718151d
commit
b019607ba5
@ -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…
x
Reference in New Issue
Block a user