[PATCH] multipathd: avoid crash in cli_list_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



multipathd can be crashed by passing an invalid path name
to the "show path" command. Fix it.
---
 multipathd/cli_handlers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index 6304ed3a..fabf4440 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -346,6 +346,8 @@ cli_list_path (void * v, char ** reply, int * len, void * data)
 	condlog(3, "%s: list path (operator)", param);
 
 	pp = find_path_by_dev(vecs->pathvec, param);
+	if (!pp)
+		return 1;
 
 	return show_path(reply, len, vecs, pp, "%o");
 }
-- 
2.19.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux