From: Denis Vlasenko Date: Sun, 22 Jun 2008 16:59:46 +0000 (-0000) Subject: mdoprobe: fix SEGV bug (by Vlad Dronnikov) X-Git-Tag: 1_11_0~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8124a96c3492efbeba00fe1999e6c67fb236ba2f;p=oweals%2Fbusybox.git mdoprobe: fix SEGV bug (by Vlad Dronnikov) --- diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 84a2d7686..3ac5a81a5 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -443,10 +443,8 @@ static struct dep_t *build_dep(void) /* It's a dep description continuation */ p = line_buffer; - p = skip_whitespace(p); - /* p points to the first dependable module; if NULL, no dependable module */ - if (p && *p) { + if (p && (p = skip_whitespace(p))[0] != '\0') { char *end = &line_buffer[l-1]; const char *deps; char *dep;