aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modutils/modprobe-small.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 91e0c1380..b7990bff1 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -297,7 +297,7 @@ static int pathname_matches_modname(const char *pathname, const char *modname)
297 char name[MODULE_NAME_LEN]; 297 char name[MODULE_NAME_LEN];
298 const char *fname = bb_get_last_path_component_nostrip(pathname); 298 const char *fname = bb_get_last_path_component_nostrip(pathname);
299 const char *suffix = strrstr(fname, ".ko"); 299 const char *suffix = strrstr(fname, ".ko");
300 safe_strncpy(name, fname, suffix - fname); 300 safe_strncpy(name, fname, suffix - fname + 1);
301 replace(name, '-', '_'); 301 replace(name, '-', '_');
302 r = (strcmp(name, modname) == 0); 302 r = (strcmp(name, modname) == 0);
303 return r; 303 return r;