tar: remove an erroneous patch

This removed patch is a workaround for gcc-4.5 manifests buffer
overflow with app-arch/tar-1.{22,23}, according to the information
from https://bugs.gentoo.org/show_bug.cgi?id=317139.

The problem with that patch is that it's only setting the magic
field of the header while the original statement sets both the magic
and the version field of the header. Because of this, all tar balls
created by the tar package in OE will be treated as old V7 format
tar balls.

As a negative effect of this behaviour, the tar package in OE cannot
handle device files correctly. This in turn leads to the udev cache
failure in images like core-image-lsb-sdk.

[YOCTO #4815]

(From OE-Core rev: 32210f73c7e9f24951306f462b25e66e1d11a6b8)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chen Qi 2013-07-17 13:41:44 +08:00 committed by Richard Purdie
parent 16b411ee60
commit f1f5f7d3b4
2 changed files with 0 additions and 37 deletions

View File

@ -1,36 +0,0 @@
port fedora patch for fortify sources sigabort. See
https://qa.mandriva.com/show_bug.cgi?id=61419 for details.
Upstream-Status: Pending
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
---
src/create.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- tar-1.26.orig/src/create.c
+++ tar-1.26/src/create.c
@@ -562,8 +562,8 @@ write_gnu_long_link (struct tar_stat_inf
GNAME_TO_CHARS (tmpname, header->header.gname);
free (tmpname);
- strcpy (header->buffer + offsetof (struct posix_header, magic),
- OLDGNU_MAGIC);
+ strncpy (header->buffer + offsetof (struct posix_header, magic),
+ OLDGNU_MAGIC, sizeof(header->header.magic));
header->header.typeflag = type;
finish_header (st, header, -1);
@@ -900,8 +900,8 @@ start_header (struct tar_stat_info *st)
case OLDGNU_FORMAT:
case GNU_FORMAT: /*FIXME?*/
/* Overwrite header->header.magic and header.version in one blow. */
- strcpy (header->buffer + offsetof (struct posix_header, magic),
- OLDGNU_MAGIC);
+ strncpy (header->buffer + offsetof (struct posix_header, magic),
+ OLDGNU_MAGIC, sizeof(header->header.magic));
break;
case POSIX_FORMAT:

View File

@ -6,7 +6,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PR = "r5"
SRC_URI += "file://remove-gets.patch \
file://tar-1.26-fortifysourcessigabrt.patch\
"
SRC_URI[md5sum] = "2cee42a2ff4f1cd4f9298eeeb2264519"