summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Ambardar2024-04-26 23:21:25 +0000
committerTony Ambardar2024-04-26 23:26:15 +0000
commit85f1053019caf4cd333795760950235ee4529ba7 (patch)
treeee303638afc0b3a3c83b2887bf873a1e0860f8aa
parentd413903016c4dc9190926e38ff72fbf7d3d69115 (diff)
downloadubox-85f1053019caf4cd333795760950235ee4529ba7.tar.gz
kmodloader: fix insmod path logic
Correct a small typo that breaks logic for insmod path selection. Fixes: 4c5c45c6beac ("kmodloader: fix invalid write during insmod, CodeQL warnings") Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
-rw-r--r--kmodloader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kmodloader.c b/kmodloader.c
index 865f2e2..8fd989f 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -942,8 +942,8 @@ static int main_insmod(int argc, char **argv)
goto err;
}
- if (!(path = get_module_path(argv[1])) ||
- (path = get_module_path(name))) {
+ if (!((path = get_module_path(argv[1])) ||
+ (path = get_module_path(name)))) {
fprintf(stderr, "Failed to find %s. Maybe it is a built in module ?\n", name);
goto err;
}