File busybox-1.18.3-libarchive.patch of Package busybox

diff -ruN busybox-1.18.3-orig/archival/libarchive/get_header_tar.c busybox-1.18.3/archival/libarchive/get_header_tar.c
--- busybox-1.18.3-orig/archival/libarchive/get_header_tar.c	2011-02-08 18:24:57.000000000 +0100
+++ busybox-1.18.3/archival/libarchive/get_header_tar.c	2011-03-12 23:28:59.000000000 +0100
@@ -287,6 +287,9 @@
 	}
 	file_header->link_target = NULL;
 	if (!p_linkname && parse_names && tar.linkname[0]) {
+		/* we trash magic[0] here to terminate tar.linkname, it's ok */
+		tar.magic[0] = '\0';
+
 		file_header->link_target = xstrndup(tar.linkname, sizeof(tar.linkname));
 		/* FIXME: what if we have non-link object with link_target? */
 		/* Will link_target be free()ed? */
openSUSE Build Service is sponsored by