From: Tony Ambardar Date: Fri, 26 Apr 2024 23:21:25 +0000 (-0700) Subject: kmodloader: fix insmod path logic X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=commitdiff_plain 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 --- 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; }