summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2000-06-26 11:16:22 +0000
committerEric Andersen2000-06-26 11:16:22 +0000
commitef40aa81c5024bc305a4e95f6edb76bae258cc2b (patch)
tree8639d692540490e21de99f0be54b8b4d6d698456
parent3adffb7fc86ece4a9c8f550abf049a459f1ea1f6 (diff)
downloadbusybox-ef40aa81c5024bc305a4e95f6edb76bae258cc2b.zip
busybox-ef40aa81c5024bc305a4e95f6edb76bae258cc2b.tar.gz
* Fixed insmod module option parsing for options lacking an '='.
Fix thanks to Marc Nijdam <marc_nijdam@hp.com> -Erik
-rw-r--r--Changelog2
-rw-r--r--insmod.c12
-rw-r--r--modutils/insmod.c12
3 files changed, 18 insertions, 8 deletions
diff --git a/Changelog b/Changelog
index aa8b15d..889d17d 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,8 @@
"none" entries in /proc/mounts, added a hack to make sysinfo
work with both old and new kernels).
* Fixed a nasty bug in tar when could mess up saved symlinks.
+ * Fixed insmod module option parsing for options lacking an '='.
+ Fix thanks to Marc Nijdam <marc_nijdam@hp.com>
-Erik Andersen
diff --git a/insmod.c b/insmod.c
index f6575c9..0064688 100644
--- a/insmod.c
+++ b/insmod.c
@@ -71,7 +71,7 @@
#ifndef MODUTILS_MODULE_H
#define MODUTILS_MODULE_H 1
-#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $"
+#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
@@ -277,7 +277,7 @@ int delete_module(const char *);
#ifndef MODUTILS_OBJ_H
#define MODUTILS_OBJ_H 1
-#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $"
+#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
@@ -1189,8 +1189,10 @@ old_process_module_arguments(struct obj_file *f, int argc, char **argv)
int *loc;
p = *argv;
- if ((q = strchr(p, '=')) == NULL)
+ if ((q = strchr(p, '=')) == NULL) {
+ argc--;
continue;
+ }
*q++ = '\0';
sym = obj_find_symbol(f, p);
@@ -1550,8 +1552,10 @@ new_process_module_arguments(struct obj_file *f, int argc, char **argv)
int min, max, n;
p = *argv;
- if ((q = strchr(p, '=')) == NULL)
+ if ((q = strchr(p, '=')) == NULL) {
+ argc--;
continue;
+ }
key = alloca(q - p + 6);
memcpy(key, "parm_", 5);
diff --git a/modutils/insmod.c b/modutils/insmod.c
index f6575c9..0064688 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -71,7 +71,7 @@
#ifndef MODUTILS_MODULE_H
#define MODUTILS_MODULE_H 1
-#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $"
+#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
@@ -277,7 +277,7 @@ int delete_module(const char *);
#ifndef MODUTILS_OBJ_H
#define MODUTILS_OBJ_H 1
-#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $"
+#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
@@ -1189,8 +1189,10 @@ old_process_module_arguments(struct obj_file *f, int argc, char **argv)
int *loc;
p = *argv;
- if ((q = strchr(p, '=')) == NULL)
+ if ((q = strchr(p, '=')) == NULL) {
+ argc--;
continue;
+ }
*q++ = '\0';
sym = obj_find_symbol(f, p);
@@ -1550,8 +1552,10 @@ new_process_module_arguments(struct obj_file *f, int argc, char **argv)
int min, max, n;
p = *argv;
- if ((q = strchr(p, '=')) == NULL)
+ if ((q = strchr(p, '=')) == NULL) {
+ argc--;
continue;
+ }
key = alloca(q - p + 6);
memcpy(key, "parm_", 5);