]> Dogcows Code - chaz/tar/commitdiff
(read_header): Don't parse OLDGNU_FORMAT incremental headers
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Aug 1999 14:43:46 +0000 (14:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Aug 1999 14:43:46 +0000 (14:43 +0000)
as POSIX prefixes.

src/list.c

index a06340d5e09044cfd39c73e7211546e072821b7d..298fd002cd239a24e1923232b1651af89fdc4d93 100644 (file)
@@ -433,8 +433,10 @@ read_header (void)
            {
              /* Accept file names as specified by POSIX.1-1996
                  section 10.1.1.  */
+             int is_posix = (strcmp (h->magic, TMAGIC) == 0);
              char *np = namebuf;
-             if (h->prefix[0])
+
+             if (is_posix && h->prefix[0])
                {
                  memcpy (np, h->prefix, sizeof h->prefix);
                  np[sizeof h->prefix] = '\0';
This page took 0.027977 seconds and 4 git commands to generate.