]> Dogcows Code - chaz/tar/commit - tests/Makefile.am
tar: don't crash if getcwd fails
authorPaul R. Eggert <eggert@cs.ucla.edu>
Thu, 15 Jul 2010 18:24:39 +0000 (11:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Jul 2010 18:25:15 +0000 (11:25 -0700)
commitcc40c57a37b1e443a5088fdda0fbb3687b1f4773
tree06bdd1bbeffbe1e714385e80d27c50289ee7c445
parentab6dd4948d1736b97a343d3c183f2dedad7421bb
tar: don't crash if getcwd fails

* src/extract.c: Don't include xgetcwd.h.
(extract_dir): stat "." rather than statting getcwd's output.
* src/misc.c (normalize_filename_x): Rewrite so as not to resolve
/../, which can't be done reliably in the presence of symlinks.
Don't reject valid names such as ".".
(normalize_filename): Don't make it absolute; that way, we don't
have to invoke xgetcwd which might fail.  Don't bother to realloc
at the end, since that uses time and now saves little space.
(chdir_do): Don't crash if xgetcwd fails.
* tests/Makefile.am (TESTSUITE_AT): Add listed03.at.
* tests/listed03.at: New file.
* tests/testsuite.at: Include listed03.at.
src/extract.c
src/misc.c
tests/Makefile.am
tests/listed03.at [new file with mode: 0644]
tests/testsuite.at
This page took 0.023283 seconds and 4 git commands to generate.