Here is a tar file which contains the file 'foo', with a date that will trigger the bug. To use with the test case:
$ tar -xvf ./354793.tar
foo
tar: foo: time stamp 2009-10-18 01:00:00 is 16613753.588577226 s in the future
$ ./354793_test.sh ./foo ; echo "$?"
2
$ ./354793_test.sh ./foo ; echo "$?"
date: ./foo: No such file or directory
1
The first run removed the file, and the second checked the hard coded date.
Here is a tar file which contains the file 'foo', with a date that will trigger the bug. To use with the test case:
$ tar -xvf ./354793.tar
foo
tar: foo: time stamp 2009-10-18 01:00:00 is 16613753.588577226 s in the future
$ ./354793_test.sh ./foo ; echo "$?"
2
$ ./354793_test.sh ./foo ; echo "$?"
date: ./foo: No such file or directory
1
The first run removed the file, and the second checked the hard coded date.