diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-03-07 01:18:30 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-03-07 01:18:30 +0000 |
commit | 61bb6e5d7404321b9f7e226e2ae72e9e6565f195 (patch) | |
tree | 5cc7e32e11bc974d798938961592e4ff7617eb6c | |
parent | 7ab17b860dfae3d5f20a0f77ef519960d8bf1649 (diff) | |
download | FreeBSD-src-61bb6e5d7404321b9f7e226e2ae72e9e6565f195.zip FreeBSD-src-61bb6e5d7404321b9f7e226e2ae72e9e6565f195.tar.gz |
Merge r608 from libarchive.googlecode.com: Clear a newly-allocated
bidder object.
-rw-r--r-- | lib/libarchive/archive_read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read.c b/lib/libarchive/archive_read.c index 240986a..552dec8 100644 --- a/lib/libarchive/archive_read.c +++ b/lib/libarchive/archive_read.c @@ -805,8 +805,10 @@ __archive_read_get_bidder(struct archive_read *a) number_slots = sizeof(a->bidders) / sizeof(a->bidders[0]); for (i = 0; i < number_slots; i++) { - if (a->bidders[i].bid == NULL) + if (a->bidders[i].bid == NULL) { + memset(a->bidders + i, 0, sizeof(a->bidders[0])); return (a->bidders + i); + } } __archive_errx(1, "Not enough slots for compression registration"); |