SHA256
1
0
forked from pool/busybox
busybox/busybox-1.18.3-libarchive.patch

15 lines
673 B
Diff
Raw Normal View History

Index: busybox-1.23.2/archival/libarchive/get_header_tar.c
===================================================================
--- busybox-1.23.2.orig/archival/libarchive/get_header_tar.c
+++ busybox-1.23.2/archival/libarchive/get_header_tar.c
@@ -304,6 +304,9 @@ char FAST_FUNC get_header_tar(archive_ha
}
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? */