summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_entry.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-03-01 06:22:34 +0000
committerkientzle <kientzle@FreeBSD.org>2007-03-01 06:22:34 +0000
commitc00cd44eca5abca948f15cc5e1e5772003e71ea3 (patch)
tree20547f42903c25a22f7baef1ee353b35a41cfe60 /lib/libarchive/archive_entry.c
parenta843fe0d3432844ab1942540ae5761afdaccccd9 (diff)
downloadFreeBSD-src-c00cd44eca5abca948f15cc5e1e5772003e71ea3.zip
FreeBSD-src-c00cd44eca5abca948f15cc5e1e5772003e71ea3.tar.gz
Because the buffer gets released immediately, I need to
copy the symlink target name, not just copy the reference. This problem sometimes caused crashes when extracting symlinks from ISO9660 images. Thanks to: Diego "Flameeyes" Pettenò
Diffstat (limited to 'lib/libarchive/archive_entry.c')
-rw-r--r--lib/libarchive/archive_entry.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c
index e3737a6..646f314 100644
--- a/lib/libarchive/archive_entry.c
+++ b/lib/libarchive/archive_entry.c
@@ -760,6 +760,12 @@ archive_entry_set_symlink(struct archive_entry *entry, const char *linkname)
}
void
+archive_entry_copy_symlink(struct archive_entry *entry, const char *linkname)
+{
+ aes_copy_mbs(&entry->ae_symlink, linkname);
+}
+
+void
archive_entry_copy_symlink_w(struct archive_entry *entry, const wchar_t *linkname)
{
aes_copy_wcs(&entry->ae_symlink, linkname);
OpenPOWER on IntegriCloud