1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-03 12:35:02 +00:00

Merge r881 from libarchive.googlecode.com: The "empty" format

should not be recognized if there is a read error.
This commit is contained in:
Tim Kientzle 2009-04-12 04:45:40 +00:00
parent 8cf9d6cd7e
commit 0da7a22640
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190955

View File

@ -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);
}