tar: fix obscure case when name is "" and prefix is not ""
authorDenis Vlasenko <vda.linux@googlemail.com>
Tue, 29 Apr 2008 04:12:58 +0000 (04:12 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Tue, 29 Apr 2008 04:12:58 +0000 (04:12 -0000)
archival/libunarchive/get_header_tar.c

index 9134d6db607aac0797270f9d99027be8015cf095..29aed184c19c1bd65ec6dd26816e6bb693e8c4c9 100644 (file)
@@ -112,7 +112,7 @@ char get_header_tar(archive_handle_t *archive_handle)
        archive_handle->offset += 512;
 
        /* If there is no filename its an empty header */
-       if (tar.name[0] == 0) {
+       if (tar.name[0] == 0 && tar.prefix[0] == 0) {
                if (end) {
                        /* This is the second consecutive empty header! End of archive!
                         * Read until the end to empty the pipe from gz or bz2