From: Robert Griebl Date: Tue, 20 Jul 2004 18:36:51 +0000 (-0000) Subject: Patch from Mike Snitzer : X-Git-Tag: 1_00_rc2~35 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd8dd1e76382eaa6b46f921b7bb6db085f55289a;p=oweals%2Fbusybox.git Patch from Mike Snitzer : Please see the attached patch for the following crash with busybox' 2.6 rmmod support --- diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 3693aec7c..f4e65d0ce 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -106,13 +106,13 @@ extern int rmmod_main(int argc, char **argv) bb_show_usage(); { + for (n = optind; n < argc; n++) { #ifdef CONFIG_FEATURE_2_6_MODULES - char module_name[strlen(argv[n]) + 1]; - filename2modname(module_name, argv[n]); + char module_name[strlen(argv[n]) + 1]; + filename2modname(module_name, argv[n]); #else #define module_name argv[n] #endif - for (n = optind; n < argc; n++) { if (syscall(__NR_delete_module, module_name, flags) < 0) { bb_perror_msg("%s", argv[n]); ret = EXIT_FAILURE;