From bb26db49b1b3a6cbc4b72c0cc6948432e3e77996 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 31 Oct 2008 02:04:28 +0000 Subject: modprobe: fix a segfault when modprobe is called with no arguments at all function old new delta modprobe_main 559 535 -24 --- modutils/modutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modutils/modutils.c') diff --git a/modutils/modutils.c b/modutils/modutils.c index 18ea5374e..10b49c901 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -106,7 +106,7 @@ char * FAST_FUNC parse_cmdline_module_options(char **argv) while (*++argv) { options = xrealloc(options, optlen + 2 + strlen(*argv) + 2); /* Spaces handled by "" pairs, but no way of escaping quotes */ - optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv); + optlen += sprintf(options + optlen, (strchr(*argv, ' ') ? "\"%s\" " : "%s "), *argv); } return options; } -- cgit v1.2.3