diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-04-12 04:45:40 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-04-12 04:45:40 +0000 |
commit | f3675e5a869c16ce9a3aae04e94ac123001a50a6 (patch) | |
tree | 4776d127c5c51f9d6e8a1a56d0ef2ad33bf84f17 /lib | |
parent | 32d233ecc5d49b564b71d9c7c48f3ad1980ab59f (diff) | |
download | FreeBSD-src-f3675e5a869c16ce9a3aae04e94ac123001a50a6.zip FreeBSD-src-f3675e5a869c16ce9a3aae04e94ac123001a50a6.tar.gz |
Merge r881 from libarchive.googlecode.com: The "empty" format
should not be recognized if there is a read error.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read_support_format_empty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_support_format_empty.c b/lib/libarchive/archive_read_support_format_empty.c index bdecd65..38498cf 100644 --- a/lib/libarchive/archive_read_support_format_empty.c +++ b/lib/libarchive/archive_read_support_format_empty.c @@ -60,9 +60,10 @@ static int archive_read_format_empty_bid(struct archive_read *a) { const void *h; + ssize_t avail; - h = __archive_read_ahead(a, 1, NULL); - if (h != NULL) + h = __archive_read_ahead(a, 1, &avail); + if (avail != 0) return (-1); return (1); } |