modeprobe-small.c patch to avaid a segfault if infovec is NULL

Alfonso Ranieri alforan at tin.it
Tue Aug 19 21:10:06 UTC 2014


--- modprobe-small.orig.c       2014-08-19 23:08:32.782302599 +0200
+++ modprobe-small.c    2014-08-19 23:07:42.056299346 +0200
@@ -640,7 +640,7 @@
          */

         /* rmmod or modprobe -r? unload module(s) */
-       if (is_rmmod) {
+       if (is_rmmod && (infovec != NULL)) {
                 infoidx = 0;
                 while ((info = infovec[infoidx++]) != NULL) {
                         int r;


More information about the busybox mailing list