mirror of
https://github.com/sheumann/hush.git
synced 2024-12-25 03:32:18 +00:00
Patch from Phil Blundellto improve substring match
This commit is contained in:
parent
65c8c7ba27
commit
d2c6f9a1f9
@ -370,9 +370,12 @@ static int mod_strcmp ( const char *mod_path, const char *mod_name )
|
||||
mod_ext = ".ko";
|
||||
#endif
|
||||
|
||||
return (strncmp(last_comp ? last_comp + 1 : mod_path,
|
||||
last_comp = last_comp ? last_comp + 1 : mod_path;
|
||||
|
||||
return (strncmp(last_comp,
|
||||
mod_name,
|
||||
strlen(mod_name)) == 0 ) &&
|
||||
((strcmp(last_comp + strlen (mod_name), mod_ext) == 0) || last_comp[strlen(mod_name)] == 0) &&
|
||||
(strcmp(mod_path + strlen(mod_path) -
|
||||
strlen(mod_ext), mod_ext) == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user