> > strncat(name, d->d_name, strlen(d->d_name)); > > The solution is to add the terminating null after line 355: > > name[strlen(curr_dir->dirname) + strlen(d->d_name)] = '\0'; > > Or to move the memset from line 331 down into the loop. Or just: strncat(name, d->d_name, strlen(d->d_name)+1); in the first place. It isn't the access to the final null that is the problem, after all, it that strcat has some bug that causes it to access memory _beyond_ the terminating null. -Tom
- [tomsrtbt] segfault bug insight, workaround Tom Oehser
- Re: [tomsrtbt] segfault bug insight, workaround Conan Brink
- [tomsrtbt] segfault bug insight, workaround Tom Oehser
- [tomsrtbt] segfault bug insight, workaround Bjorn Eriksson
- Re: [tomsrtbt] segfault bug insight, workaround Tom Oehser
- RE: [tomsrtbt] segfault bug insight, workaround Bjorn Eriksson
- RE: [tomsrtbt] segfault bug insight, workaround Tom Oehser
