aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/tar/tar-1.17
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/tar/tar-1.17')
-rw-r--r--recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch23
-rw-r--r--recipes-extended/tar/tar-1.17/gcc43build.patch37
-rw-r--r--recipes-extended/tar/tar-1.17/m4extensions.patch30
3 files changed, 90 insertions, 0 deletions
diff --git a/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
new file mode 100644
index 0000000..af5026f
--- /dev/null
+++ b/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+CVE: CVE-2010-0624
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+
+ sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+ if (do_command (handle, command_buffer) == -1
+- || (status = get_status (handle)) == SAFE_READ_ERROR)
++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+ return SAFE_READ_ERROR;
+
+ for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/recipes-extended/tar/tar-1.17/gcc43build.patch b/recipes-extended/tar/tar-1.17/gcc43build.patch
new file mode 100644
index 0000000..f8059a0
--- /dev/null
+++ b/recipes-extended/tar/tar-1.17/gcc43build.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Fix errors when built with gcc 4.3
+# Patch taken from Debian bug #452096
+
+diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h
+--- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800
++++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700
+@@ -198,7 +198,11 @@
+ #endif
+
+ #ifndef ARGP_FS_EI
+-#define ARGP_FS_EI extern inline
++ #if defined __GNUC_STDC_INLINE__
++ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__))
++ #else
++ #define ARGP_FS_EI extern inline
++ #endif
+ #endif
+
+ ARGP_FS_EI size_t
+diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h
+--- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700
++++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700
+@@ -580,7 +580,11 @@
+ # endif
+
+ # ifndef ARGP_EI
+-# define ARGP_EI extern __inline__
++# if defined __GNUC_STDC_INLINE__
++# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__))
++# else
++# define ARGP_EI extern __inline__
++# endif
+ # endif
+
+ ARGP_EI void
diff --git a/recipes-extended/tar/tar-1.17/m4extensions.patch b/recipes-extended/tar/tar-1.17/m4extensions.patch
new file mode 100644
index 0000000..30534c2
--- /dev/null
+++ b/recipes-extended/tar/tar-1.17/m4extensions.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+--- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700
++++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4 -*- Autoconf -*-
++# serial 5 -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------