Git init
[external/insserv.git] / debian / patches / 40_badboy_segfault.patch
1 Purpose: Defend against corrupt or invalid scripts living in
2          /etc/rc[S0-6].d/
3 Fixes:   #493202
4 Status:  Acked by upstream.
5 ---
6 Index: insserv/insserv.c
7 ===================================================================
8 --- insserv.orig/insserv.c      2009-09-26 22:35:39.000000000 +0200
9 +++ insserv/insserv.c   2009-09-26 22:35:44.000000000 +0200
10 @@ -1696,6 +1696,11 @@
11             }
12  
13             lsb = scan_script_defaults(dfd, d->d_name, override_path, &name, true, ignore);
14 +           if (!name) {
15 +               warn("warning: script is corrupt or invalid: %s/%s%s\n", path, rcd, d->d_name);
16 +               continue;
17 +           }
18 +
19             if (!script_inf.provides || script_inf.provides == empty)
20                 script_inf.provides = xstrdup(ptr);
21