--- libinit.h +++ libinit.h 2009-03-10 13:06:32.512001779 +0100 @@ -46,7 +46,7 @@ # define restrict __restrict__ # endif #endif -#define alignof(type) (sizeof(type)+(sizeof(type)%sizeof(void*))) +#define alignof(type) ((sizeof(type)+(sizeof(void*)-1)) & ~(sizeof(void*)-1)) /* * LSB specs: --- mkill.c +++ mkill.c 2009-03-11 14:37:13.668001801 +0100 @@ -525,6 +525,7 @@ static void sort_proc(void) static int check(const char *restrict name) { + const size_t nlen = strlen(name); mntent_t *p, *n, *l; n = mntent; @@ -532,6 +533,10 @@ static int check(const char *restrict na for (p = mntent; n; p = n) { l = p->prev; n = p->next; + if (nlen < p->nlen) + continue; + if (name[p->nlen] != '\0' && name[p->nlen] != '/') + continue; if (strncmp(name, p->name, p->nlen) == 0) return p->order; }