Index: gzip.c =================================================================== RCS file: /cvsroot/src/gnu/usr.bin/gzip/gzip.c,v retrieving revision 1.9 diff -u -r1.9 gzip.c --- gzip.c 2002/01/15 09:18:15 1.9 +++ gzip.c 2003/03/28 16:47:22 @@ -1629,6 +1629,12 @@ local void copy_stat(ifstat) struct stat *ifstat; { + if (ifstat->st_size != isize) { + WARN((stderr, "%s: ", progname)); + if (!quiet) perror(ifname); + (void)unlink(ofname); + return; + } #ifndef NO_UTIME if (decompress && time_stamp != 0 && ifstat->st_mtime != time_stamp) { ifstat->st_mtime = time_stamp;