Hello community, here is the log from the commit of package insserv checked in at Fri Feb 1 22:29:57 CET 2008. -------- --- insserv/insserv.changes 2008-01-30 21:53:05.000000000 +0100 +++ insserv/insserv.changes 2008-02-01 14:36:07.850103000 +0100 @@ -1,0 +2,6 @@ +Fri Feb 1 14:34:52 CET 2008 - werner@suse.de + +- Avoid SIGSEGV in functions which can handle NULL pointers + thanks goes to Petter Reinholdtsen for his report + +------------------------------------------------------------------- @@ -17 +23 @@ - * Support for reading LSB headers info from override directory + * Support for reading LSB headers info from override directroy New: ---- insserv-1.11.0.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ insserv.spec ++++++ --- /var/tmp/diff_new_pack.c27653/_old 2008-02-01 22:17:45.000000000 +0100 +++ /var/tmp/diff_new_pack.c27653/_new 2008-02-01 22:17:45.000000000 +0100 @@ -16,11 +16,11 @@ Provides: aaa_base:/sbin/insserv AutoReqProv: on Version: 1.11.0 -Release: 1 +Release: 3 Summary: A Program to Arrange Initialization Scripts Source0: insserv-%{version}.tar.bz2 Source1: insserv.conf -#Patch: insserv-%{version}.dif +Patch: insserv-%{version}.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -36,7 +36,7 @@ %prep %setup -#%patch +%patch %build make @@ -54,6 +54,9 @@ %{_mandir}/man8/insserv.8.gz %changelog +* Fri Feb 01 2008 werner@suse.de +- Avoid SIGSEGV in functions which can handle NULL pointers + thanks goes to Petter Reinholdtsen for his report * Wed Jan 30 2008 werner@suse.de - New version 1.11.0 of insserv - Code cleanup, update copyrights, and manual pages @@ -65,7 +68,7 @@ Petter Reinholdtsen * Make it possible to set the path at runtime, to make it easier to write test suites - * Support for reading LSB headers info from override directory + * Support for reading LSB headers info from override directroy * Accept script names like 'rc.local' for Debian build * Use other defaults on Debian systems (start, stop levels) * Put redundant level informations in one API ++++++ insserv-1.11.0.dif ++++++ --- insserv.c +++ insserv.c 2008-02-01 11:43:45.634618329 +0100 @@ -166,7 +166,7 @@ typedef struct pwd_struct { static list_t pwd = { &(pwd), &(pwd) }, * topd = &(pwd); -static void pushd(const char *const __restrict path); +static void pushd(const char *const __restrict path) __attribute__((nonnull(1))); static void pushd(const char *const path) { pwd_t * dir; @@ -305,13 +305,13 @@ out: return getserv(ptr); } -static serv_t * findserv(const char *const __restrict serv) __attribute__((nonnull(1))); +static serv_t * findserv(const char *const __restrict serv); static serv_t * findserv(const char *const serv) { list_t * ptr; serv_t * ret = (serv_t*)0; - if (!serv) + if (serv == (const char*)0) goto out; list_for_each(ptr, serv_start) { @@ -334,6 +334,9 @@ static void rememberreq(serv_t *serv, ui list_t * ptr; uint old = bit; + if (!tmp) + error("%s", strerror(errno)); + while ((token = strsep(&tmp, delimeter))) { boolean found = false; req_t * this; @@ -399,6 +402,9 @@ static void reversereq(const serv_t * se char * rev = strdupa(list); uint old = bit; + if (!rev) + error("%s", strerror(errno)); + while ((dep = strsep(&rev, delimeter)) && *dep) { serv_t * tmp; list_t * ptr; @@ -437,7 +443,7 @@ static void reversereq(const serv_t * se /* * Check required services for name */ -static boolean chkrequired(const char *const __restrict name) __attribute__((nonnull(1))); +static boolean chkrequired(const char *const __restrict name); static boolean chkrequired(const char *const name) { serv_t * serv = findserv(name); --- listing.h +++ listing.h 2008-02-01 11:40:45.347748072 +0100 @@ -97,11 +97,11 @@ extern int makeprov(const char *__restri extern void setorder(const char *__restrict script, const int order, boolean recursive) __attribute__((nonnull(1))); extern int getorder(const char *__restrict script) __attribute__((nonnull(1))); extern boolean notincluded(const char *__restrict script, const int runlevel) __attribute__((nonnull(1))); -extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(1,2))); -extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1,2))); +extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(2))); +extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1))); extern const char * getscript(const char *__restrict prov) __attribute__((nonnull(1))); extern const char * getprovides(const char *__restrict script) __attribute__((nonnull(1))); -extern boolean listscripts(const char **__restrict script, const int lvl) __attribute__((nonnull(1))); +extern boolean listscripts(const char **__restrict script, const int lvl); extern int maxorder; extern boolean is_loop_detected(void); @@ -116,7 +116,7 @@ extern int map_has_runlevels(void); extern int map_runlevel_to_lvl (const int runlevel); extern int map_key_to_lvl(const char key); -static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline,nonnull(1))); +static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline)); static inline char * xstrdup(const char * s) { char * r; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org