head 1.24; access; symbols OPENPKG_E1_MP_HEAD:1.15 OPENPKG_E1_MP:1.15 OPENPKG_E1_MP_2_STABLE:1.12.2.2 OPENPKG_E1_FP:1.12.2.2 OPENPKG_2_STABLE_MP:1.15 OPENPKG_2_STABLE_20061018:1.12.2.1 OPENPKG_2_STABLE_20060622:1.12 OPENPKG_2_STABLE:1.12.0.2 OPENPKG_2_STABLE_BP:1.12 OPENPKG_2_5_RELEASE:1.10 OPENPKG_2_5_SOLID:1.10.0.6 OPENPKG_2_5_SOLID_BP:1.10 OPENPKG_2_4_RELEASE:1.10 OPENPKG_2_4_SOLID:1.10.0.4 OPENPKG_2_4_SOLID_BP:1.10 OPENPKG_CW_FP:1.10 OPENPKG_2_3_RELEASE:1.10 OPENPKG_2_3_SOLID:1.10.0.2 OPENPKG_2_3_SOLID_BP:1.10 OPENPKG_2_2_RELEASE:1.5 OPENPKG_2_2_SOLID:1.5.0.4 OPENPKG_2_2_SOLID_BP:1.5 OPENPKG_2_1_RELEASE:1.5 OPENPKG_2_1_SOLID:1.5.0.2 OPENPKG_2_1_SOLID_BP:1.5 OPENPKG_2_0_RELEASE:1.2 OPENPKG_2_0_SOLID:1.2.0.2 OPENPKG_2_0_SOLID_BP:1.2; locks; strict; comment @# @; 1.24 date 2009.03.05.22.21.10; author rse; state Exp; branches; next 1.23; commitid sRzyBJbEpJyGvTEt; 1.23 date 2008.12.28.09.25.40; author rse; state Exp; branches; next 1.22; commitid GGzfXyjB6qzandwt; 1.22 date 2008.04.14.15.11.52; author rse; state Exp; branches; next 1.21; commitid 8tEmd4S6BJX6A5Zs; 1.21 date 2007.10.17.23.11.51; author cs; state Exp; branches; next 1.20; commitid dgHPpm5Dwaxu10Cs; 1.20 date 2007.10.17.06.45.17; author rse; state Exp; branches; next 1.19; commitid rZjQF4mYo7d2zUBs; 1.19 date 2007.10.10.15.07.00; author rse; state Exp; branches; next 1.18; commitid OFZ49gJCzkG6z3Bs; 1.18 date 2007.09.04.08.33.25; author rse; state Exp; branches; next 1.17; commitid M0xQ7p6fC6KOxows; 1.17 date 2007.06.30.07.44.49; author rse; state Exp; branches; next 1.16; commitid gaHjLIkHlgMGoUns; 1.16 date 2007.06.08.16.56.31; author rse; state Exp; branches; next 1.15; commitid r1oJjOCIaSCN98ls; 1.15 date 2006.12.05.12.27.46; author cs; state Exp; branches; next 1.14; commitid MOaJLBwcILBhCkXr; 1.14 date 2006.10.22.09.48.40; author rse; state Exp; branches; next 1.13; commitid 7qNQZMFdUnPo9FRr; 1.13 date 2006.10.03.17.56.41; author rse; state Exp; branches; next 1.12; commitid 5KjC4Eeuc2pGsgPr; 1.12 date 2006.06.10.10.05.42; author rse; state Exp; branches 1.12.2.1; next 1.11; commitid ghgGlJzd82KgyrAr; 1.11 date 2006.03.05.18.53.56; author rse; state Exp; branches; next 1.10; commitid OToL9OTiliBOA1or; 1.10 date 2005.01.31.20.37.23; author rse; state Exp; branches 1.10.2.1 1.10.4.1 1.10.6.1; next 1.9; 1.9 date 2004.12.22.07.40.34; author rse; state Exp; branches; next 1.8; 1.8 date 2004.12.22.07.31.15; author rse; state Exp; branches; next 1.7; 1.7 date 2004.12.20.19.35.01; author rse; state Exp; branches; next 1.6; 1.6 date 2004.12.20.19.05.50; author rse; state Exp; branches; next 1.5; 1.5 date 2004.05.15.16.30.28; author rse; state Exp; branches; next 1.4; 1.4 date 2004.05.10.12.38.08; author rse; state Exp; branches; next 1.3; 1.3 date 2004.04.06.07.47.45; author rse; state Exp; branches; next 1.2; 1.2 date 2003.12.11.10.37.11; author rse; state Exp; branches; next 1.1; 1.1 date 2003.10.07.09.51.56; author rse; state Exp; branches; next ; 1.12.2.1 date 2006.10.16.14.57.02; author rse; state Exp; branches; next 1.12.2.2; commitid iZxwRSmmWscPXUQr; 1.12.2.2 date 2006.10.22.09.49.34; author rse; state Exp; branches; next 1.12.2.3; commitid 3m5Kri3hpWqH9FRr; 1.12.2.3 date 2006.12.10.09.35.16; author rse; state Exp; branches; next ; commitid ERgAXM0FOK79vXXr; 1.10.2.1 date 2006.03.05.18.58.12; author rse; state Exp; branches; next ; commitid hb8A1xUejI5hC1or; 1.10.4.1 date 2006.03.05.18.57.25; author rse; state Exp; branches; next ; commitid ZN2LeaNVFxP0C1or; 1.10.6.1 date 2006.03.05.18.55.36; author rse; state Exp; branches; next ; commitid 4MpuLS1lOzRnB1or; desc @@ 1.24 log @upgrading package: tar 1.21 -> 1.22 @ text @Index: Makefile.in --- Makefile.in.orig 2009-03-05 08:05:27 +0100 +++ Makefile.in 2009-03-05 23:13:43 +0100 @@@@ -659,7 +659,7 @@@@ top_srcdir = @@top_srcdir@@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = ChangeLog.1 PORTS -SUBDIRS = doc lib rmt src scripts po tests +SUBDIRS = doc lib src all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive Index: lib/argp-help.c --- lib/argp-help.c.orig 2009-02-01 10:24:40 +0100 +++ lib/argp-help.c 2009-03-05 23:13:43 +0100 @@@@ -569,8 +569,7 @@@@ return val; } -static inline int -__attribute__ ((always_inline)) +static int hol_entry_long_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, Index: lib/strerror.c --- lib/strerror.c.orig 2009-01-23 19:02:44 +0100 +++ lib/strerror.c 2009-03-05 23:13:43 +0100 @@@@ -23,6 +23,7 @@@@ # include # include +# include # if GNULIB_defined_ESOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H Index: src/compare.c --- src/compare.c.orig 2008-02-20 15:16:30 +0100 +++ src/compare.c 2009-03-05 23:13:43 +0100 @@@@ -278,7 +278,7 @@@@ size_t len = strlen (current_stat_info.link_name); char *linkbuf = alloca (len + 1); - int status = readlink (current_stat_info.file_name, linkbuf, len + 1); + int status = readlink (current_stat_info.file_name, linkbuf, len); if (status < 0) { Index: src/create.c --- src/create.c.orig 2008-10-30 11:58:04 +0100 +++ src/create.c 2009-03-05 23:13:43 +0100 @@@@ -1697,7 +1697,7 @@@@ if (linklen != st->stat.st_size || linklen + 1 == 0) xalloc_die (); buffer = (char *) alloca (linklen + 1); - size = readlink (p, buffer, linklen + 1); + size = readlink (p, buffer, linklen); if (size < 0) { readlink_diag (p); Index: src/incremen.c --- src/incremen.c.orig 2008-12-30 00:18:00 +0100 +++ src/incremen.c 2009-03-05 23:13:43 +0100 @@@@ -671,6 +671,7 @@@@ children = CHANGED_CHILDREN; but changed to: */ free (name_buffer); + if (dirp) free (dirp); return NULL; } Index: src/tar.c --- src/tar.c.orig 2009-03-05 08:04:13 +0100 +++ src/tar.c 2009-03-05 23:13:43 +0100 @@@@ -20,6 +20,7 @@@@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include +#include #include #include Index: src/utf8.c --- src/utf8.c.orig 2007-10-29 18:53:07 +0100 +++ src/utf8.c 2009-03-05 23:13:43 +0100 @@@@ -22,6 +22,9 @@@@ #include "common.h" #ifdef HAVE_ICONV_H # include +#else +# define iconv_t void * +# define ICONV_CONST const #endif #ifndef ICONV_CONST Index: src/xheader.c --- src/xheader.c.orig 2008-11-30 13:30:54 +0100 +++ src/xheader.c 2009-03-05 23:13:43 +0100 @@@@ -25,6 +25,10 @@@@ #include "common.h" +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + static bool xheader_protected_pattern_p (char const *pattern); static bool xheader_protected_keyword_p (char const *keyword); static void xheader_set_single_keyword (char *) __attribute__ ((noreturn)); @ 1.23 log @upgrading package: tar 1.20 -> 1.21 @ text @d2 3 a4 3 --- Makefile.in.orig 2008-12-26 23:41:50 +0100 +++ Makefile.in 2008-12-28 10:23:35 +0100 @@@@ -606,7 +606,7 @@@@ d14 2 a15 2 --- lib/argp-help.c.orig 2008-10-30 08:57:48 +0100 +++ lib/argp-help.c 2008-12-28 10:23:35 +0100 d27 2 a28 2 --- lib/strerror.c.orig 2008-10-30 08:57:48 +0100 +++ lib/strerror.c 2008-12-28 10:23:35 +0100 d39 1 a39 1 +++ src/compare.c 2008-12-28 10:23:35 +0100 d51 1 a51 1 +++ src/create.c 2008-12-28 10:23:35 +0100 d62 3 a64 3 --- src/incremen.c.orig 2008-09-07 10:46:11 +0200 +++ src/incremen.c 2008-12-28 10:23:35 +0100 @@@@ -663,6 +663,7 @@@@ d73 2 a74 2 --- src/tar.c.orig 2008-10-30 11:53:34 +0100 +++ src/tar.c 2008-12-28 10:23:35 +0100 d85 1 a85 1 +++ src/utf8.c 2008-12-28 10:23:35 +0100 d98 1 a98 1 +++ src/xheader.c 2008-12-28 10:23:35 +0100 @ 1.22 log @upgrading package: tar 1.19 -> 1.20 @ text @d2 3 a4 3 --- Makefile.in.orig 2008-04-14 14:04:01 +0200 +++ Makefile.in 2008-04-14 17:09:00 +0200 @@@@ -532,7 +532,7 @@@@ d14 2 a15 2 --- lib/argp-help.c.orig 2007-11-18 11:46:56 +0100 +++ lib/argp-help.c 2008-04-14 17:09:00 +0200 d27 3 a29 4 --- lib/strerror.c.orig 2007-11-18 11:46:56 +0100 +++ lib/strerror.c 2008-04-14 17:09:00 +0200 @@@@ -22,6 +22,7 @@@@ #if REPLACE_STRERROR d31 1 d35 2 a36 2 # include "intprops.h" d39 1 a39 1 +++ src/compare.c 2008-04-14 17:09:00 +0200 d50 2 a51 2 --- src/create.c.orig 2008-04-14 14:03:12 +0200 +++ src/create.c 2008-04-14 17:09:00 +0200 d62 3 a64 3 --- src/incremen.c.orig 2008-04-14 14:03:13 +0200 +++ src/incremen.c 2008-04-14 17:09:00 +0200 @@@@ -602,6 +602,7 @@@@ d73 2 a74 2 --- src/tar.c.orig 2008-04-14 14:03:13 +0200 +++ src/tar.c 2008-04-14 17:09:00 +0200 d85 1 a85 1 +++ src/utf8.c 2008-04-14 17:09:00 +0200 d97 3 a99 3 --- src/xheader.c.orig 2007-06-27 15:30:32 +0200 +++ src/xheader.c 2008-04-14 17:09:00 +0200 @@@@ -27,6 +27,10 @@@@ d101 1 a101 1 #include @ 1.21 log @Back out previous CHAR_BIT commit and provide missing #include on relevant piece of code. This should make Solaris 8 happy (and not AIX as mentioned in previous commit log) @ text @d2 4 a5 4 --- Makefile.in.orig 2007-10-10 13:00:22 +0200 +++ Makefile.in 2007-10-17 08:40:12 +0200 @@@@ -485,7 +485,7 @@@@ target_alias = @@target_alias@@ d14 3 a16 3 --- lib/argp-help.c.orig 2007-09-28 15:11:36 +0200 +++ lib/argp-help.c 2007-10-17 08:40:12 +0200 @@@@ -570,8 +570,7 @@@@ d26 11 d38 2 a39 2 --- src/compare.c.orig 2007-08-26 10:56:55 +0200 +++ src/compare.c 2007-10-17 08:40:12 +0200 d50 3 a52 3 --- src/create.c.orig 2007-10-05 19:46:49 +0200 +++ src/create.c 2007-10-17 08:40:12 +0200 @@@@ -1696,7 +1696,7 @@@@ d62 3 a64 3 --- src/incremen.c.orig 2007-10-01 23:19:55 +0200 +++ src/incremen.c 2007-10-17 08:40:12 +0200 @@@@ -526,6 +526,7 @@@@ d73 2 a74 2 --- src/tar.c.orig 2007-09-26 23:36:58 +0200 +++ src/tar.c 2007-10-17 08:40:12 +0200 d84 2 a85 2 --- src/utf8.c.orig 2007-06-27 15:30:32 +0200 +++ src/utf8.c 2007-10-17 08:40:12 +0200 d98 1 a98 1 +++ src/xheader.c 2007-10-17 08:40:12 +0200 a109 11 Index: lib/strerror.c --- lib/strerror.c.orig 2007-09-28 15:11:37 +0200 +++ lib/strerror.c 2007-10-18 00:55:28 +0200 @@@@ -23,6 +23,7 @@@@ # include # include +# include # undef strerror @ 1.20 log @apply a workaround for AIX @ text @a25 14 Index: lib/system.h --- lib/system.h.orig 2007-06-27 15:49:45 +0200 +++ lib/system.h 2007-10-17 08:43:09 +0200 @@@@ -417,6 +417,10 @@@@ #include +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + #ifndef MB_LEN_MAX # define MB_LEN_MAX 1 #endif d99 11 @ 1.19 log @upgrading package: tar 1.18 -> 1.19 @ text @d3 1 a3 1 +++ Makefile.in 2007-10-10 17:01:10 +0200 d15 1 a15 1 +++ lib/argp-help.c 2007-10-10 17:01:10 +0200 d26 14 d42 1 a42 1 +++ src/compare.c 2007-10-10 17:01:10 +0200 d54 1 a54 1 +++ src/create.c 2007-10-10 17:01:10 +0200 d66 1 a66 1 +++ src/incremen.c 2007-10-10 17:01:10 +0200 d77 1 a77 1 +++ src/tar.c 2007-10-10 17:01:10 +0200 d88 1 a88 1 +++ src/utf8.c 2007-10-10 17:01:10 +0200 d101 1 a101 1 +++ src/xheader.c 2007-10-10 17:01:10 +0200 @ 1.18 log @Security Fix (CVE-2007-4131) @ text @d2 3 a4 3 --- Makefile.in.orig 2007-06-29 13:01:32 +0200 +++ Makefile.in 2007-06-30 09:41:22 +0200 @@@@ -466,7 +466,7 @@@@ d14 2 a15 2 --- lib/argp-help.c.orig 2007-06-28 19:18:55 +0200 +++ lib/argp-help.c 2007-06-30 09:41:22 +0200 d27 2 a28 2 --- src/compare.c.orig 2007-06-27 15:30:31 +0200 +++ src/compare.c 2007-06-30 09:41:22 +0200 d39 3 a41 3 --- src/create.c.orig 2007-06-27 15:30:31 +0200 +++ src/create.c 2007-06-30 09:41:22 +0200 @@@@ -1692,7 +1692,7 @@@@ d51 3 a53 3 --- src/incremen.c.orig 2007-06-27 15:30:32 +0200 +++ src/incremen.c 2007-06-30 09:41:22 +0200 @@@@ -481,6 +481,7 @@@@ d62 2 a63 2 --- src/tar.c.orig 2007-06-27 15:30:32 +0200 +++ src/tar.c 2007-06-30 09:41:22 +0200 d71 1 a71 1 #include d74 1 a74 1 +++ src/utf8.c 2007-06-30 09:41:22 +0200 d87 1 a87 1 +++ src/xheader.c 2007-06-30 09:41:22 +0200 a98 21 ----------------------------------------------------------------------------- Security Fix (CVE-2007-4131) Index: src/names.c --- src/names.c.orig +++ src/names.c @@@@ -1012,11 +1012,10 @@@@ if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2])) return 1; - do + while (! ISSLASH (*p)) { if (! *p++) return 0; } - while (! ISSLASH (*p)); } } @ 1.17 log @upgrading package: tar 1.17 -> 1.18 @ text @d99 21 @ 1.16 log @upgrading package: tar 1.16.1 -> 1.17 @ text @d2 4 a5 4 --- Makefile.in.orig 2007-06-08 10:35:58 +0200 +++ Makefile.in 2007-06-08 18:46:17 +0200 @@@@ -464,7 +464,7 @@@@ top_srcdir = @@top_srcdir@@ d14 2 a15 2 --- lib/argp-help.c.orig 2007-05-11 15:15:30 +0200 +++ lib/argp-help.c 2007-06-08 18:46:17 +0200 a25 9 @@@@ -595,7 +594,7 @@@@ } /* Iterator that returns true for the first short option. */ -static inline int +static int until_short (const struct argp_option *opt, const struct argp_option *real, const char *domain, void *cookie) { d27 2 a28 2 --- src/compare.c.orig 2007-06-01 12:17:10 +0200 +++ src/compare.c 2007-06-08 18:46:17 +0200 d39 2 a40 2 --- src/create.c.orig 2007-06-01 12:17:10 +0200 +++ src/create.c 2007-06-08 18:46:17 +0200 d51 2 a52 2 --- src/incremen.c.orig 2007-03-30 10:19:30 +0200 +++ src/incremen.c 2007-06-08 18:46:17 +0200 d62 2 a63 2 --- src/tar.c.orig 2007-06-01 12:17:10 +0200 +++ src/tar.c 2007-06-08 18:46:17 +0200 d73 2 a74 2 --- src/utf8.c.orig 2006-12-13 09:08:22 +0100 +++ src/utf8.c 2007-06-08 18:46:17 +0200 d86 2 a87 2 --- src/xheader.c.orig 2007-06-01 12:17:10 +0200 +++ src/xheader.c 2007-06-08 18:46:17 +0200 @ 1.15 log @skip build of irrelevant parts of the GNU tar distribution @ text @d2 4 a5 4 --- Makefile.in.orig 2006-10-21 17:41:31 +0200 +++ Makefile.in 2006-12-05 10:09:24 +0100 @@@@ -310,7 +310,7 @@@@ target_alias = @@target_alias@@ d14 3 a16 3 --- lib/argp-help.c.orig 2006-09-12 10:59:04 +0200 +++ lib/argp-help.c 2006-10-22 11:35:12 +0200 @@@@ -567,8 +567,7 @@@@ d26 1 a26 1 @@@@ -592,7 +591,7 @@@@ d36 3 a38 3 --- src/compare.c.orig 2006-03-20 10:23:29 +0100 +++ src/compare.c 2006-10-22 11:36:29 +0200 @@@@ -295,7 +295,7 @@@@ d48 3 a50 3 --- src/create.c.orig 2006-10-16 08:33:55 +0200 +++ src/create.c 2006-10-22 11:36:18 +0200 @@@@ -1600,7 +1600,7 @@@@ d60 3 a62 3 --- src/incremen.c.orig 2006-09-08 18:42:18 +0200 +++ src/incremen.c 2006-10-22 11:43:46 +0200 @@@@ -479,6 +479,7 @@@@ d71 2 a72 2 --- src/tar.c.orig 2006-10-17 10:11:31 +0200 +++ src/tar.c 2006-10-22 11:35:12 +0200 d82 2 a83 2 --- src/utf8.c.orig 2005-05-18 14:23:49 +0200 +++ src/utf8.c 2006-10-22 11:35:12 +0200 d95 3 a97 3 --- src/xheader.c.orig 2006-10-22 11:35:12 +0200 +++ src/xheader.c 2006-10-22 11:40:55 +0200 @@@@ -28,6 +28,10 @@@@ @ 1.14 log @upgrading package: tar 1.15.1 -> 1.16 @ text @d1 12 a34 11 Index: rmt/rmt.c --- rmt/rmt.c.orig 2006-09-27 10:54:46 +0200 +++ rmt/rmt.c 2006-10-22 11:35:12 +0200 @@@@ -43,6 +43,7 @@@@ #include #include #include +#include #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 @ 1.13 log @remove 'inline' optimizations in argument parsing as some platforms (e.g. FreeBSD/amd64) for unknown reasons have problems during linking with it @ text @d2 3 a4 3 --- lib/argp-help.c.orig 2004-10-04 11:36:16 +0200 +++ lib/argp-help.c 2006-10-03 19:53:59 +0200 @@@@ -532,8 +532,7 @@@@ d14 1 a14 1 @@@@ -557,7 +556,7 @@@@ a22 36 Index: src/incremen.c --- src/incremen.c.orig 2004-09-06 13:30:42 +0200 +++ src/incremen.c 2004-12-20 19:55:06 +0100 @@@@ -133,6 +133,8 @@@@ if (! dirp) { savedir_error (dir_name); + errno = 1; + return; } errno = 0; Index: src/utf8.c --- src/utf8.c.orig 2004-10-25 16:14:53 +0200 +++ src/utf8.c 2004-12-20 19:54:25 +0100 @@@@ -22,6 +22,9 @@@@ #include "common.h" #ifdef HAVE_ICONV_H # include +#else +# define iconv_t void * +# define ICONV_CONST const #endif #ifndef ICONV_CONST Index: src/xheader.c --- src/xheader.c.orig 2004-09-06 13:31:14 +0200 +++ src/xheader.c 2004-12-20 19:54:25 +0100 @@@@ -23,6 +23,7 @@@@ #include #include #include +#include #include "common.h" d24 4 a27 4 --- rmt/rmt.c.orig 2004-09-06 15:49:41 +0200 +++ rmt/rmt.c 2004-12-20 20:01:28 +0100 @@@@ -38,6 +38,7 @@@@ d34 35 d70 2 a71 2 --- src/tar.c.orig 2004-12-21 15:11:26 +0100 +++ src/tar.c 2005-01-31 21:34:57 +0100 d73 1 a73 1 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ d79 12 a90 12 #include @@@@ -617,9 +618,9 @@@@ switch (key) { - case 1: + case ARGP_KEY_ARG: /* File name or non-parsed option, because of ARGP_IN_ORDER */ - name_add (optarg); + name_add (arg); args->input_files++; break; d92 1 a92 29 Index: src/compare.c --- src/compare.c.orig 2004-09-06 13:30:29 +0200 +++ src/compare.c 2005-01-31 21:34:57 +0100 @@@@ -327,7 +327,7 @@@@ size_t len = strlen (current_stat_info.link_name); char *linkbuf = alloca (len + 1); - status = readlink (current_stat_info.file_name, linkbuf, len + 1); + status = readlink (current_stat_info.file_name, linkbuf, len); if (status < 0) { Index: src/create.c --- src/create.c.orig 2004-10-04 11:21:31 +0200 +++ src/create.c 2005-01-31 21:34:57 +0100 @@@@ -1482,7 +1482,7 @@@@ if (linklen != st->stat.st_size || linklen + 1 == 0) xalloc_die (); buffer = (char *) alloca (linklen + 1); - size = readlink (p, buffer, linklen + 1); + size = readlink (p, buffer, linklen); if (size < 0) { readlink_diag (p); ----------------------------------------------------------------------------- Security Fixes (CVE-2006-0300) d94 3 a96 3 --- src/xheader.c.orig 2006-06-10 08:58:04 +0200 +++ src/xheader.c 2006-06-10 09:01:31 +0200 @@@@ -33,6 +33,10 @@@@ a106 119 @@@@ -784,6 +788,32 @@@@ xheader_print (xhdr, keyword, sbuf); } +static bool +decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, + char const *keyword) +{ + uintmax_t u; + char *arg_lim; + + if (! (ISDIGIT (*arg) + && (errno = 0, xstrtoumax (arg, &arg_lim, 10, &u, ""), !*arg_lim))) + { + ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), + keyword, arg)); + return false; + } + + if (! (u <= maxval && errno != ERANGE)) + { + ERROR ((0, 0, _("Extended header %s=%s is out of range"), + keyword, arg)); + return false; + } + + *num = u; + return true; +} + static void dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), char const *keyword __attribute__ ((unused)), @@@@ -822,7 +852,7 @@@@ gid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) st->stat.st_gid = u; } @@@@ -904,7 +934,7 @@@@ size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) st->archive_file_size = st->stat.st_size = u; } @@@@ -919,7 +949,7 @@@@ uid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) st->stat.st_uid = u; } @@@@ -947,7 +977,7 @@@@ sparse_size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) st->stat.st_size = u; } @@@@ -963,10 +993,10 @@@@ sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) { st->sparse_map_size = u; - st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); + st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); st->sparse_map_avail = 0; } } @@@@ -983,8 +1013,14 @@@@ sparse_offset_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) + { + if (st->sparse_map_avail < st->sparse_map_size) st->sparse_map[st->sparse_map_avail].offset = u; + else + ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), + "GNU.sparse.offset", arg)); + } } static void @@@@ -999,15 +1035,13 @@@@ sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) { if (st->sparse_map_avail == st->sparse_map_size) - { - st->sparse_map_size *= 2; - st->sparse_map = xrealloc (st->sparse_map, - st->sparse_map_size - * sizeof st->sparse_map[0]); - } + st->sparse_map = x2nrealloc (st->sparse_map, + &st->sparse_map_size, + sizeof st->sparse_map[0]); + st->sparse_map[st->sparse_map_avail++].numbytes = u; } } @ 1.12 log @enhance portability of security patch and this way fix building under acient platforms (like FreeBSD 4) @ text @d1 22 @ 1.12.2.1 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 22 Index: lib/argp-help.c --- lib/argp-help.c.orig 2004-10-04 11:36:16 +0200 +++ lib/argp-help.c 2006-10-03 19:53:59 +0200 @@@@ -532,8 +532,7 @@@@ return val; } -static inline int -__attribute__ ((always_inline)) +static int hol_entry_long_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, @@@@ -557,7 +556,7 @@@@ } /* Iterator that returns true for the first short option. */ -static inline int +static int until_short (const struct argp_option *opt, const struct argp_option *real, const char *domain, void *cookie) { @ 1.12.2.2 log @MFC: latest fixed version @ text @d2 3 a4 3 --- lib/argp-help.c.orig 2006-09-12 10:59:04 +0200 +++ lib/argp-help.c 2006-10-22 11:35:12 +0200 @@@@ -567,8 +567,7 @@@@ d14 1 a14 1 @@@@ -592,7 +591,7 @@@@ d23 36 d60 4 a63 4 --- rmt/rmt.c.orig 2006-09-27 10:54:46 +0200 +++ rmt/rmt.c 2006-10-22 11:35:12 +0200 @@@@ -43,6 +43,7 @@@@ #include a69 35 Index: src/compare.c --- src/compare.c.orig 2006-03-20 10:23:29 +0100 +++ src/compare.c 2006-10-22 11:36:29 +0200 @@@@ -295,7 +295,7 @@@@ size_t len = strlen (current_stat_info.link_name); char *linkbuf = alloca (len + 1); - int status = readlink (current_stat_info.file_name, linkbuf, len + 1); + int status = readlink (current_stat_info.file_name, linkbuf, len); if (status < 0) { Index: src/create.c --- src/create.c.orig 2006-10-16 08:33:55 +0200 +++ src/create.c 2006-10-22 11:36:18 +0200 @@@@ -1600,7 +1600,7 @@@@ if (linklen != st->stat.st_size || linklen + 1 == 0) xalloc_die (); buffer = (char *) alloca (linklen + 1); - size = readlink (p, buffer, linklen + 1); + size = readlink (p, buffer, linklen); if (size < 0) { readlink_diag (p); Index: src/incremen.c --- src/incremen.c.orig 2006-09-08 18:42:18 +0200 +++ src/incremen.c 2006-10-22 11:43:46 +0200 @@@@ -479,6 +479,7 @@@@ children = CHANGED_CHILDREN; but changed to: */ free (name_buffer); + if (dirp) free (dirp); return NULL; } d71 2 a72 2 --- src/tar.c.orig 2006-10-17 10:11:31 +0200 +++ src/tar.c 2006-10-22 11:35:12 +0200 d74 1 a74 1 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ d80 22 a101 12 #include Index: src/utf8.c --- src/utf8.c.orig 2005-05-18 14:23:49 +0200 +++ src/utf8.c 2006-10-22 11:35:12 +0200 @@@@ -22,6 +22,9 @@@@ #include "common.h" #ifdef HAVE_ICONV_H # include +#else +# define iconv_t void * +# define ICONV_CONST const #endif d103 19 a121 1 #ifndef ICONV_CONST d123 3 a125 3 --- src/xheader.c.orig 2006-10-22 11:35:12 +0200 +++ src/xheader.c 2006-10-22 11:40:55 +0200 @@@@ -28,6 +28,10 @@@@ d136 119 @ 1.12.2.3 log @MFC: latest update (contains security fix) @ text @a0 12 Index: Makefile.in --- Makefile.in.orig 2006-10-21 17:41:31 +0200 +++ Makefile.in 2006-12-05 10:09:24 +0100 @@@@ -310,7 +310,7 @@@@ target_alias = @@target_alias@@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = ChangeLog.1 PORTS -SUBDIRS = doc lib rmt src scripts po tests +SUBDIRS = doc lib src all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive d23 11 @ 1.11 log @Security Fixes (CVE-2006-0300) @ text @d101 14 a114 3 --- src/xheader.c.orig 2006-03-05 09:35:35 +0100 +++ src/xheader.c 2006-03-05 09:38:10 +0100 @@@@ -784,6 +784,32 @@@@ d147 1 a147 1 @@@@ -822,7 +848,7 @@@@ d156 1 a156 1 @@@@ -904,7 +930,7 @@@@ d165 1 a165 1 @@@@ -919,7 +945,7 @@@@ d174 1 a174 1 @@@@ -947,7 +973,7 @@@@ d183 1 a183 1 @@@@ -963,10 +989,10 @@@@ d196 1 a196 1 @@@@ -983,8 +1009,14 @@@@ d212 1 a212 1 @@@@ -999,15 +1031,13 @@@@ @ 1.10 log @apply three bugfixes from the vendor @ text @d95 127 @ 1.10.2.1 log @Security Fixes (CVE-2006-0300) @ text @a94 127 ----------------------------------------------------------------------------- Security Fixes (CVE-2006-0300) Index: src/xheader.c --- src/xheader.c.orig 2006-03-05 09:35:35 +0100 +++ src/xheader.c 2006-03-05 09:38:10 +0100 @@@@ -784,6 +784,32 @@@@ xheader_print (xhdr, keyword, sbuf); } +static bool +decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, + char const *keyword) +{ + uintmax_t u; + char *arg_lim; + + if (! (ISDIGIT (*arg) + && (errno = 0, xstrtoumax (arg, &arg_lim, 10, &u, ""), !*arg_lim))) + { + ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), + keyword, arg)); + return false; + } + + if (! (u <= maxval && errno != ERANGE)) + { + ERROR ((0, 0, _("Extended header %s=%s is out of range"), + keyword, arg)); + return false; + } + + *num = u; + return true; +} + static void dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), char const *keyword __attribute__ ((unused)), @@@@ -822,7 +848,7 @@@@ gid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) st->stat.st_gid = u; } @@@@ -904,7 +930,7 @@@@ size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) st->archive_file_size = st->stat.st_size = u; } @@@@ -919,7 +945,7 @@@@ uid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) st->stat.st_uid = u; } @@@@ -947,7 +973,7 @@@@ sparse_size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) st->stat.st_size = u; } @@@@ -963,10 +989,10 @@@@ sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) { st->sparse_map_size = u; - st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); + st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); st->sparse_map_avail = 0; } } @@@@ -983,8 +1009,14 @@@@ sparse_offset_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) + { + if (st->sparse_map_avail < st->sparse_map_size) st->sparse_map[st->sparse_map_avail].offset = u; + else + ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), + "GNU.sparse.offset", arg)); + } } static void @@@@ -999,15 +1031,13 @@@@ sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) { if (st->sparse_map_avail == st->sparse_map_size) - { - st->sparse_map_size *= 2; - st->sparse_map = xrealloc (st->sparse_map, - st->sparse_map_size - * sizeof st->sparse_map[0]); - } + st->sparse_map = x2nrealloc (st->sparse_map, + &st->sparse_map_size, + sizeof st->sparse_map[0]); + st->sparse_map[st->sparse_map_avail++].numbytes = u; } } @ 1.10.4.1 log @Security Fixes (CVE-2006-0300) @ text @a94 127 ----------------------------------------------------------------------------- Security Fixes (CVE-2006-0300) Index: src/xheader.c --- src/xheader.c.orig 2006-03-05 09:35:35 +0100 +++ src/xheader.c 2006-03-05 09:38:10 +0100 @@@@ -784,6 +784,32 @@@@ xheader_print (xhdr, keyword, sbuf); } +static bool +decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, + char const *keyword) +{ + uintmax_t u; + char *arg_lim; + + if (! (ISDIGIT (*arg) + && (errno = 0, xstrtoumax (arg, &arg_lim, 10, &u, ""), !*arg_lim))) + { + ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), + keyword, arg)); + return false; + } + + if (! (u <= maxval && errno != ERANGE)) + { + ERROR ((0, 0, _("Extended header %s=%s is out of range"), + keyword, arg)); + return false; + } + + *num = u; + return true; +} + static void dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), char const *keyword __attribute__ ((unused)), @@@@ -822,7 +848,7 @@@@ gid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) st->stat.st_gid = u; } @@@@ -904,7 +930,7 @@@@ size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) st->archive_file_size = st->stat.st_size = u; } @@@@ -919,7 +945,7 @@@@ uid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) st->stat.st_uid = u; } @@@@ -947,7 +973,7 @@@@ sparse_size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) st->stat.st_size = u; } @@@@ -963,10 +989,10 @@@@ sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) { st->sparse_map_size = u; - st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); + st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); st->sparse_map_avail = 0; } } @@@@ -983,8 +1009,14 @@@@ sparse_offset_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) + { + if (st->sparse_map_avail < st->sparse_map_size) st->sparse_map[st->sparse_map_avail].offset = u; + else + ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), + "GNU.sparse.offset", arg)); + } } static void @@@@ -999,15 +1031,13 @@@@ sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) { if (st->sparse_map_avail == st->sparse_map_size) - { - st->sparse_map_size *= 2; - st->sparse_map = xrealloc (st->sparse_map, - st->sparse_map_size - * sizeof st->sparse_map[0]); - } + st->sparse_map = x2nrealloc (st->sparse_map, + &st->sparse_map_size, + sizeof st->sparse_map[0]); + st->sparse_map[st->sparse_map_avail++].numbytes = u; } } @ 1.10.6.1 log @Security Fixes (CVE-2006-0300) @ text @a94 127 ----------------------------------------------------------------------------- Security Fixes (CVE-2006-0300) Index: src/xheader.c --- src/xheader.c.orig 2006-03-05 09:35:35 +0100 +++ src/xheader.c 2006-03-05 09:38:10 +0100 @@@@ -784,6 +784,32 @@@@ xheader_print (xhdr, keyword, sbuf); } +static bool +decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, + char const *keyword) +{ + uintmax_t u; + char *arg_lim; + + if (! (ISDIGIT (*arg) + && (errno = 0, xstrtoumax (arg, &arg_lim, 10, &u, ""), !*arg_lim))) + { + ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), + keyword, arg)); + return false; + } + + if (! (u <= maxval && errno != ERANGE)) + { + ERROR ((0, 0, _("Extended header %s=%s is out of range"), + keyword, arg)); + return false; + } + + *num = u; + return true; +} + static void dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), char const *keyword __attribute__ ((unused)), @@@@ -822,7 +848,7 @@@@ gid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) st->stat.st_gid = u; } @@@@ -904,7 +930,7 @@@@ size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) st->archive_file_size = st->stat.st_size = u; } @@@@ -919,7 +945,7 @@@@ uid_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) st->stat.st_uid = u; } @@@@ -947,7 +973,7 @@@@ sparse_size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) st->stat.st_size = u; } @@@@ -963,10 +989,10 @@@@ sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) { st->sparse_map_size = u; - st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); + st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); st->sparse_map_avail = 0; } } @@@@ -983,8 +1009,14 @@@@ sparse_offset_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) + { + if (st->sparse_map_avail < st->sparse_map_size) st->sparse_map[st->sparse_map_avail].offset = u; + else + ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), + "GNU.sparse.offset", arg)); + } } static void @@@@ -999,15 +1031,13 @@@@ sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; - if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) + if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) { if (st->sparse_map_avail == st->sparse_map_size) - { - st->sparse_map_size *= 2; - st->sparse_map = xrealloc (st->sparse_map, - st->sparse_map_size - * sizeof st->sparse_map[0]); - } + st->sparse_map = x2nrealloc (st->sparse_map, + &st->sparse_map_size, + sizeof st->sparse_map[0]); + st->sparse_map[st->sparse_map_avail++].numbytes = u; } } @ 1.9 log @ops, forgot one hunk of the old patch @ text @d49 2 a50 2 --- src/tar.c.orig 2004-12-18 21:01:07 +0100 +++ src/tar.c 2004-12-20 20:01:54 +0100 d59 36 @ 1.8 log @upgrading package: tar 1.14 -> 1.15.1 @ text @d1 12 @ 1.7 log @backout upgrade: 1.15 doesn't unpack bzip2-1.0.2.tar.gz correctly @ text @a0 12 Index: src/incremen.c --- src/incremen.c.orig 2004-02-21 10:39:18.000000000 +0100 +++ src/incremen.c 2004-04-05 08:25:44.000000000 +0200 @@@@ -133,6 +133,8 @@@@ if (! dirp) { savedir_error (path); + errno = 1; + return; } errno = 0; d2 3 a4 3 --- src/utf8.c.orig 2004-04-04 11:53:30.000000000 +0200 +++ src/utf8.c 2004-04-06 09:42:13.000000000 +0200 @@@@ -21,6 +21,9 @@@@ d13 1 a13 1 struct langtab d15 3 a17 4 --- src/xheader.c.orig 2004-04-04 11:53:30.000000000 +0200 +++ src/xheader.c 2004-05-14 16:17:02.000000000 +0200 @@@@ -21,6 +21,7 @@@@ #include d19 1 d25 22 @ 1.6 log @upgrading package: tar 1.14 -> 1.15 @ text @d2 2 a3 2 --- src/incremen.c.orig 2004-09-06 13:30:42 +0200 +++ src/incremen.c 2004-12-20 19:55:06 +0100 d7 1 a7 1 savedir_error (dir_name); d14 3 a16 3 --- src/utf8.c.orig 2004-10-25 16:14:53 +0200 +++ src/utf8.c 2004-12-20 19:54:25 +0100 @@@@ -22,6 +22,9 @@@@ d25 1 a25 1 #ifndef ICONV_CONST d27 4 a30 3 --- src/xheader.c.orig 2004-09-06 13:31:14 +0200 +++ src/xheader.c 2004-12-20 19:54:25 +0100 @@@@ -23,6 +23,7 @@@@ a31 1 #include a36 22 Index: rmt/rmt.c --- rmt/rmt.c.orig 2004-09-06 15:49:41 +0200 +++ rmt/rmt.c 2004-12-20 20:01:28 +0100 @@@@ -38,6 +38,7 @@@@ #include #include +#include #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 Index: src/tar.c --- src/tar.c.orig 2004-12-18 21:01:07 +0100 +++ src/tar.c 2004-12-20 20:01:54 +0100 @@@@ -20,6 +20,7 @@@@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include +#include #include #include @ 1.5 log @upgrading package: tar 1.13.94 -> 1.14 @ text @d2 2 a3 2 --- src/incremen.c.orig 2004-02-21 10:39:18.000000000 +0100 +++ src/incremen.c 2004-04-05 08:25:44.000000000 +0200 d7 1 a7 1 savedir_error (path); d14 3 a16 3 --- src/utf8.c.orig 2004-04-04 11:53:30.000000000 +0200 +++ src/utf8.c 2004-04-06 09:42:13.000000000 +0200 @@@@ -21,6 +21,9 @@@@ d25 1 a25 1 struct langtab d27 3 a29 4 --- src/xheader.c.orig 2004-04-04 11:53:30.000000000 +0200 +++ src/xheader.c 2004-05-14 16:17:02.000000000 +0200 @@@@ -21,6 +21,7 @@@@ #include d31 1 d37 22 @ 1.4 log @fix patch @ text @d26 11 @ 1.3 log @upgrading package: tar 1.13.92 -> 1.13.94 @ text @d9 1 a9 1 + return NULL; @ 1.2 log @upgrading package: tar 1.13.25 -> 1.13.91 @ text @d2 10 a11 10 --- src/incremen.c.orig 2003-11-17 08:55:29.000000000 +0100 +++ src/incremen.c 2003-12-11 11:29:17.000000000 +0100 @@@@ -189,6 +189,8 @@@@ if (! dirp) { savedir_error (path); + errno = 1; + return NULL; } errno = 0; d13 13 @ 1.1 log @modifying package: tar-1.13.25 20030409 -> 20031007 @ text @d1 5 a5 7 The following patches fix various problems. They are derived from RedHat's "tar" package. Index: src/extract.c --- src/extract.c.orig 2001-09-24 20:55:17.000000000 +0200 +++ src/extract.c 2003-10-07 11:46:03.000000000 +0200 @@@@ -1019,10 +1019,19 @@@@ d7 4 a10 32 struct stat st1, st2; int e; + size_t skiplinkcrud; + + if (absolute_names_option) + skiplinkcrud = 0; + else { + skiplinkcrud = FILESYSTEM_PREFIX_LEN (current_link_name); + while (ISSLASH (current_link_name[skiplinkcrud])) + skiplinkcrud++; + } /* MSDOS does not implement links. However, djgpp's link() actually copies the file. */ - status = link (current_link_name, CURRENT_FILE_NAME); + status = link (current_link_name + skiplinkcrud, CURRENT_FILE_NAME); if (status == 0) { Index: src/incremen.c --- src/incremen.c.orig 2001-08-29 20:20:19.000000000 +0200 +++ src/incremen.c 2003-10-07 11:46:03.000000000 +0200 @@@@ -186,8 +186,11 @@@@ struct directory *directory; /* for checking if already already seen */ enum children children; - if (! dirp) + if (! dirp) { savedir_error (path); + errno = 1; + return NULL; + } a12 78 name_buffer_size = strlen (path) + NAME_FIELD_SIZE; Index: src/tar.c --- src/tar.c.orig 2001-09-21 02:11:27.000000000 +0200 +++ src/tar.c 2003-10-07 11:46:03.000000000 +0200 @@@@ -534,7 +534,7 @@@@ /* Allocate a new argument array, and copy program name in it. */ new_argc = argc - 1 + strlen (argv[1]); - new_argv = xmalloc (new_argc * sizeof (char *)); + new_argv = xmalloc ((new_argc + 1) * sizeof (char *)); in = argv; out = new_argv; *out++ = *in++; @@@@ -562,6 +562,10 @@@@ while (in < argv + argc) *out++ = *in++; + /* K&R standard requires a NULL termination */ + + *out = NULL; + /* Replace the old option list by the new one. */ argc = new_argc; Index: src/misc.c --- src/misc.c.orig 2001-08-27 01:14:26.000000000 +0200 +++ src/misc.c 2003-10-07 11:46:03.000000000 +0200 @@@@ -214,6 +214,13 @@@@ return 0; } while (! ISSLASH (*p)); + + do + { + if (! *p++) + return 0; + } + while ( ISSLASH (*p)); } } Index: src/create.c --- src/create.c.orig 2001-08-29 23:21:02.000000000 +0200 +++ src/create.c 2003-10-07 11:46:03.000000000 +0200 @@@@ -1128,6 +1128,16 @@@@ } else if (is_avoided_name (p)) return; + else if (S_ISSOCK (current_stat.st_mode)) + { + WARN ((0, 0, _("%s: socket ignored"), quotearg_colon (p))); + return; + } + else if (S_ISDOOR (current_stat.st_mode)) + { + WARN ((0, 0, _("%s: door ignored"), quotearg_colon (p))); + return; + } else { /* Check for multiple links. @@@@ -1507,16 +1517,6 @@@@ type = BLKTYPE; else if (S_ISFIFO (current_stat.st_mode)) type = FIFOTYPE; - else if (S_ISSOCK (current_stat.st_mode)) - { - WARN ((0, 0, _("%s: socket ignored"), quotearg_colon (p))); - return; - } - else if (S_ISDOOR (current_stat.st_mode)) - { - WARN ((0, 0, _("%s: door ignored"), quotearg_colon (p))); - return; - } else goto unknown; } @