summaryrefslogtreecommitdiff
path: root/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-01-19 09:08:45 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-19 09:08:45 +0100
commitdea0b13403e2696046d1469f691945a74545127e (patch)
treeaca6e45b153a10d8e8a054a38b8bae7dd2177bf3 /package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch
parent0705e448a484eca77bca37b96ee0ef03f55251e7 (diff)
busybox: add 1.18.2 fixes
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch')
-rw-r--r--package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch b/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch
new file mode 100644
index 000000000..b0623f255
--- /dev/null
+++ b/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe-small.patch
@@ -0,0 +1,19 @@
+--- busybox-1.18.2/modutils/modprobe-small.c
++++ busybox-1.18.2-modprobe-small/modutils/modprobe-small.c
+@@ -205,6 +205,7 @@ static void parse_module(module_info *in
+ /* Read (possibly compressed) module */
+ len = 64 * 1024 * 1024; /* 64 Mb at most */
+ module_image = xmalloc_open_zipped_read_close(pathname, &len);
++ /* module_image == NULL is ok here, find_keyword handles it */
+ //TODO: optimize redundant module body reads
+
+ /* "alias1 symbol:sym1 alias2 symbol:sym2" */
+@@ -845,6 +846,8 @@ int modprobe_main(int argc UNUSED_PARAM,
+
+ len = MAXINT(ssize_t);
+ map = xmalloc_open_zipped_read_close(*argv, &len);
++ if (!map)
++ bb_perror_msg_and_die("can't read '%s'", *argv);
+ if (init_module(map, len,
+ IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
+ IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")