BB: ubox: fix segmentation fault in insmod
[14.07/openwrt.git] / package / system / ubox / patches / 100-insmod-segfault.patch
diff --git a/package/system/ubox/patches/100-insmod-segfault.patch b/package/system/ubox/patches/100-insmod-segfault.patch
new file mode 100644 (file)
index 0000000..df010d1
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/kmodloader.c
++++ b/kmodloader.c
+@@ -605,6 +605,9 @@ static int main_insmod(int argc, char **
+               cur += sprintf(cur, "%s", argv[i]);
+       }
++      if (init_module_folders())
++              return -1;
++
+       if (get_module_path(argv[1])) {
+               name = argv[1];
+       } else if (!get_module_path(name)) {