--- xwax-0.7-alpha1/library.c 2009-11-23 17:18:35.000000000 -0600 +++ xwax-0.7-alpha1_modified/library.c 2009-12-23 16:53:08.000000000 -0600 @@ -29,6 +29,7 @@ #include #include +#include "getdelim.h" #include "library.h" @@ -209,6 +210,7 @@ pid_t pid; FILE *fp; struct crate_t *crate, *all_crate; + size_t pathlength; fprintf(stderr, "Scanning '%s'...\n", path); @@ -218,7 +220,10 @@ return -1; } - pathname = strdupa(path); + pathlength = strlen(path) + 1; + pathname = alloca(pathlength); + memcpy(pathname, path, pathlength); + cratename = basename(pathname); /* POSIX version, see basename(3) */ assert(cratename != NULL); crate = library_new_crate(li, cratename, false);