diff --git a/lib/libarchive/archive_read_support_format_empty.c b/lib/libarchive/archive_read_support_format_empty.c index bdecd6548854..38498cf7ff3d 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); }