Check a pointer in skipdirs() before dereferencing it. I don't fully

understand why it can become a null pointer under some circumstances,
but i've got a pile of tapes where this happens, and running it thru a
debugger proved that simply ending the loop in this case did the right
thing.

Anyway, it cannot make it worse than now, where restore kills itself
with "Memory fault".
This commit is contained in:
Joerg Wunsch 1995-09-01 18:09:20 +00:00
parent e3038c6ef5
commit 4d14a29026
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10515

View File

@ -201,7 +201,7 @@ void
skipdirs()
{
while ((curfile.dip->di_mode & IFMT) == IFDIR) {
while (curfile.dip && (curfile.dip->di_mode & IFMT) == IFDIR) {
skipfile();
}
}