X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=a0c65a334bf29d74539281a168b203c19e9129fa;hb=c086e08a4bb931721b2bc8db545ecb3eeaa431dd;hp=513bb0fb6591429993abcb4e36f00bc72dfa6bee;hpb=fa8cdce44753cf5c0a78a4ddaff862ab2612f559;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index 513bb0f..a0c65a3 100644 --- a/src/list.c +++ b/src/list.c @@ -1,5 +1,5 @@ /* List a tar archive. - Copyright (C) 1988, 1992 Free Software Foundation + Copyright (C) 1988, 1992, 1993 Free Software Foundation This file is part of GNU Tar. @@ -404,7 +404,7 @@ recurse: : head->header.arch_name); if (current_file_name) free (current_file_name); - current_file_name = malloc (strlen (name) + 1); + current_file_name = ck_malloc (strlen (name) + 1); strcpy (current_file_name, name); name = (next_long_link @@ -412,7 +412,7 @@ recurse: : head->header.arch_linkname); if (current_link_name) free (current_link_name); - current_link_name = malloc (strlen (name) + 1); + current_link_name = ck_malloc (strlen (name) + 1); strcpy (current_link_name, name); next_long_link = next_long_name = 0; @@ -447,6 +447,7 @@ decode_header (header, st, stdp, wantug) long from_oct (); st->st_mode = from_oct (8, header->header.mode); + st->st_mode &= 07777; st->st_mtime = from_oct (1 + 12, header->header.mtime); if (f_gnudump) {