aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index fbe18b640..b05158ac0 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -178,6 +178,10 @@ static struct dep_t *build_dep ( void )
if (( *(end-1) == '.' ) && ( *end == 'o' ))
ext = 2;
+
+ /* Cope with blank lines */
+ if ((end-deps-ext+1) <= 0)
+ continue;
dep = xstrndup ( deps, end - deps - ext + 1 );