Mail Archives: djgpp/1998/03/15/12:02:23
Here my patch. It corrects the stack from being overwritten, when the
disk is full or when the directory nesting is to deep, when the user
gives first one directory name and then another which is longer than
the first.
*** djlib/src/utils/djtar/djtar.org Thu Jan 1 16:35:50 1998
--- djlib/src/utils/djtar/djtar.c Fri Mar 13 23:23:06 1998
***************
*** 234,240 ****
--- 234,246 ----
break;
r = mkdir (n, 0777);
if (r)
+ {
+ if(errno == ENOENT)
+ {
+ Fatal("Unable to create directory");
+ }
r = change(n, "Unable to create directory", 1);
+ }
} while (r);
*sl = save;
}
***************
*** 446,451 ****
--- 452,461 ----
{
status = change(dirname, "Duplicate directory name", 2);
continue;
+ }
+ if (status && (errno==ENOENT))
+ {
+ Fatal("Unable to create directory");
}
if (status)
status = change(dirname, "Unable to create directory", 1);
- Raw text -