From abb4a85ef05f99fb9d43cce21e9eb3bde8849653b055ce01eeb2638a25864330 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 7 May 2007 12:30:01 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/busybox?expand=0&rev=3 --- busybox.changes | 5 ++++ install.patch => busybox.install.patch | 0 busybox.libunarchive-array.patch | 41 ++++++++++++++++++++++++++ busybox.spec | 8 +++-- 4 files changed, 52 insertions(+), 2 deletions(-) rename install.patch => busybox.install.patch (100%) create mode 100644 busybox.libunarchive-array.patch diff --git a/busybox.changes b/busybox.changes index f3e8c40..2e90f1b 100644 --- a/busybox.changes +++ b/busybox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 7 10:27:51 CEST 2007 - olh@suse.de + +- gcc42 rejects out of bounds array access + ------------------------------------------------------------------- Sat Apr 28 21:32:57 CEST 2007 - olh@suse.de diff --git a/install.patch b/busybox.install.patch similarity index 100% rename from install.patch rename to busybox.install.patch diff --git a/busybox.libunarchive-array.patch b/busybox.libunarchive-array.patch new file mode 100644 index 0000000..fad5b89 --- /dev/null +++ b/busybox.libunarchive-array.patch @@ -0,0 +1,41 @@ +archival/libunarchive/get_header_tar.c: In function 'get_header_tar': +archival/libunarchive/get_header_tar.c:140: warning: array subscript is above array bounds +archival/libunarchive/get_header_tar.c:155: warning: array subscript is above array bounds +archival/libunarchive/get_header_tar.c:158: warning: array subscript is above array bounds +make[1]: *** [archival/libunarchive/get_header_tar.o] Error 1 + +--- + archival/libunarchive/get_header_tar.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +Index: busybox-1.4.2/archival/libunarchive/get_header_tar.c +=================================================================== +--- busybox-1.4.2.orig/archival/libunarchive/get_header_tar.c ++++ busybox-1.4.2/archival/libunarchive/get_header_tar.c +@@ -136,8 +136,8 @@ char get_header_tar(archive_handle_t *ar + } + file_header->link_name = NULL; + if (!linkname && parse_names && tar.linkname[0]) { +- /* we trash magic[0] here, it's ok */ +- tar.linkname[sizeof(tar.linkname)] = '\0'; ++ /* we trash magic[0] here to terminate tar.linkname, it's ok */ ++ tar.magic[0] = '\0'; + file_header->link_name = xstrdup(tar.linkname); + /* FIXME: what if we have non-link object with link_name? */ + /* Will link_name be free()ed? */ +@@ -151,11 +151,11 @@ char get_header_tar(archive_handle_t *ar + + file_header->name = NULL; + if (!longname && parse_names) { +- /* we trash mode[0] here, it's ok */ +- tar.name[sizeof(tar.name)] = '\0'; ++ /* we trash mode[0] here to terminate tar.name, it's ok */ ++ tar.mode[0] = '\0'; + if (tar.prefix[0]) { +- /* and padding[0] */ +- tar.prefix[sizeof(tar.prefix)] = '\0'; ++ /* and padding[0] to terminate tar.prefix */ ++ tar.padding[0] = '\0'; + file_header->name = concat_path_file(tar.prefix, tar.name); + } else + file_header->name = xstrdup(tar.name); diff --git a/busybox.spec b/busybox.spec index d39b66c..bf87ab7 100644 --- a/busybox.spec +++ b/busybox.spec @@ -14,7 +14,7 @@ Name: busybox BuildRequires: dietlibc URL: http://www.busybox.net/ Version: 1.4.2 -Release: 1 +Release: 3 Summary: The Swiss Army Knife of Embedded Linux License: GNU General Public License (GPL) Group: System/Base @@ -22,7 +22,8 @@ Autoreqprov: on Source: http://busybox.net/downloads/%{name}-%{version}.tar.bz2 Source2: SuSE.config Patch0: busybox.taskset-range.patch -Patch1: install.patch +Patch1: busybox.install.patch +Patch2: busybox.libunarchive-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -46,6 +47,7 @@ Authors: %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build cp -avL %{S:2} .config @@ -78,6 +80,8 @@ install -m 644 docs/BusyBox.1 $RPM_BUILD_ROOT%_mandir/man1 %config /usr/share/busybox/busybox.links %changelog +* Mon May 07 2007 - olh@suse.de +- gcc42 rejects out of bounds array access * Sat Apr 28 2007 - olh@suse.de - update to 1.4.2 reduces binary size after e2fsprogs removal