summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_entry.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-04-13 23:45:37 +0000
committerkientzle <kientzle@FreeBSD.org>2004-04-13 23:45:37 +0000
commit5c2c79eafdaffd172c20dd2cebc96f3dea266b96 (patch)
tree6b324c0c8fe5322b967c90baad9fbf3b820f985f /lib/libarchive/archive_entry.c
parent2d52f8e62f64e1c72b250c97a58a6e324d6b62d4 (diff)
downloadFreeBSD-src-5c2c79eafdaffd172c20dd2cebc96f3dea266b96.zip
FreeBSD-src-5c2c79eafdaffd172c20dd2cebc96f3dea266b96.tar.gz
* Plug a buffer overrun in ACL parsing. (archive_entry.c)
* Re-use a single buffer for shar output formatting rather than hammering the heap. (archive_write_set_format_shar.c) * Fix a handful of minor memory leaks and clean up some of the memory-management code.
Diffstat (limited to 'lib/libarchive/archive_entry.c')
-rw-r--r--lib/libarchive/archive_entry.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c
index be261f5..7ea63fc 100644
--- a/lib/libarchive/archive_entry.c
+++ b/lib/libarchive/archive_entry.c
@@ -481,6 +481,12 @@ archive_entry_set_hardlink(struct archive_entry *entry, const char *target)
}
void
+archive_entry_copy_hardlink(struct archive_entry *entry, const char *target)
+{
+ aes_copy_mbs(&entry->ae_hardlink, target);
+}
+
+void
archive_entry_copy_hardlink_w(struct archive_entry *entry, const wchar_t *target)
{
aes_copy_wcs(&entry->ae_hardlink, target);
@@ -1111,6 +1117,7 @@ __archive_entry_acl_parse_w(struct archive_entry *entry,
malloc(namebuff_length * sizeof(wchar_t));
}
wmemcpy(namebuff, name_start, name_end - name_start);
+ namebuff[name_end - name_start] = L'\0';
archive_entry_acl_add_entry_w(entry, type,
permset, tag, id, namebuff);
}
OpenPOWER on IntegriCloud