diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-04-13 23:45:37 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-04-13 23:45:37 +0000 |
commit | 5c2c79eafdaffd172c20dd2cebc96f3dea266b96 (patch) | |
tree | 6b324c0c8fe5322b967c90baad9fbf3b820f985f /lib/libarchive/archive_read.c | |
parent | 2d52f8e62f64e1c72b250c97a58a6e324d6b62d4 (diff) | |
download | FreeBSD-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_read.c')
-rw-r--r-- | lib/libarchive/archive_read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libarchive/archive_read.c b/lib/libarchive/archive_read.c index ae2c8d8..7af242a 100644 --- a/lib/libarchive/archive_read.c +++ b/lib/libarchive/archive_read.c @@ -428,8 +428,8 @@ archive_read_finish(struct archive *a) /* Casting a pointer to int allows us to remove 'const.' */ free((void *)(uintptr_t)(const void *)a->nulls); - if (a->extract_mkdirpath.s != NULL) - free(a->extract_mkdirpath.s); + archive_string_free(&a->extract_mkdirpath); + archive_string_free(&a->error_string); if (a->entry) archive_entry_free(a->entry); a->magic = 0; @@ -455,7 +455,7 @@ __archive_read_register_format(struct archive *a, for (i = 0; i < number_slots; i++) { if (a->formats[i].bid == bid) - return (0); /* We've already installed */ + return (ARCHIVE_WARN); /* We've already installed */ if (a->formats[i].bid == NULL) { a->formats[i].bid = bid; a->formats[i].read_header = read_header; |