From 85f1053019caf4cd333795760950235ee4529ba7 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Fri, 26 Apr 2024 16:21:25 -0700 Subject: [PATCH] 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 --- kmodloader.c | 4 ++-- 1 file 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; } -- 2.30.2