summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/tar
diff options
context:
space:
mode:
authorFahad Usman <fahad_usman@mentor.com>2012-12-12 18:01:32 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-13 14:36:53 +0000
commit648cda68def82fa12b3af599c06caecdc7568668 (patch)
tree693cc8b0da4aceb441e9cb864c011c46e6efcbb4 /meta/recipes-extended/tar
parentd49facde4fffc95cd153195fc0114dfbc1bf512c (diff)
downloadopenembedded-core-648cda68def82fa12b3af599c06caecdc7568668.tar.gz
tar: apply fedora patch for fortify sources sigabort
See https://qa.mandriva.com/show_bug.cgi?id=61419 for details. Signed-off-by: Christopher Larson <chris_larson@mentor.com> the patch was imported from meta-mentor layer on yoctoproject git server http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id 333d2e0510a1e052cb83a6f8beed6d8bcea59b2c Signed-off-by: Fahad Usman <fahad_usman@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/tar')
-rw-r--r--meta/recipes-extended/tar/tar-1.26/tar-1.26-fortifysourcessigabrt.patch36
-rw-r--r--meta/recipes-extended/tar/tar_1.26.bb3
2 files changed, 38 insertions, 1 deletions
diff --git a/meta/recipes-extended/tar/tar-1.26/tar-1.26-fortifysourcessigabrt.patch b/meta/recipes-extended/tar/tar-1.26/tar-1.26-fortifysourcessigabrt.patch
new file mode 100644
index 0000000000..6aef096896
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.26/tar-1.26-fortifysourcessigabrt.patch
@@ -0,0 +1,36 @@
+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:
diff --git a/meta/recipes-extended/tar/tar_1.26.bb b/meta/recipes-extended/tar/tar_1.26.bb
index 03a35c3d3f..d45c2b14ed 100644
--- a/meta/recipes-extended/tar/tar_1.26.bb
+++ b/meta/recipes-extended/tar/tar_1.26.bb
@@ -3,9 +3,10 @@ require tar.inc
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-PR = "r4"
+PR = "r5"
SRC_URI += "file://remove-gets.patch \
+ file://tar-1.26-fortifysourcessigabrt.patch\
"
SRC_URI[md5sum] = "2cee42a2ff4f1cd4f9298eeeb2264519"