From fac89d274332dacffb27e963ca7afa6ea89914d8 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 14 Apr 2007 08:42:50 +0000 Subject: [PATCH] Fix the build. N.B. 'ar' format support is broken right now, it's not passing tests. If I can't find the problem soon, I'll back out the last commit. --- lib/libarchive/Makefile | 2 +- lib/libarchive/archive_read_support_format_ar.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index e0048abbecf9..36b5dc2d975b 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -9,7 +9,7 @@ LDADD= -lbz2 -lz # Major: Bumped ONLY when API/ABI breakage happens (see SHLIB_MAJOR) # Minor: Bumped when significant new features are added # Revision: Bumped on any notable change -VERSION= 2.0.29 +VERSION= 2.0.30 ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//' ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//' diff --git a/lib/libarchive/archive_read_support_format_ar.c b/lib/libarchive/archive_read_support_format_ar.c index 9f765afccf71..e94d8c297775 100644 --- a/lib/libarchive/archive_read_support_format_ar.c +++ b/lib/libarchive/archive_read_support_format_ar.c @@ -258,7 +258,7 @@ archive_read_format_ar_read_header(struct archive_read *a, bytes = (a->compression_read_ahead)(a, &b, tab_size); if (bytes <= 0) return (ARCHIVE_FATAL); - if (bytes < tab_size) { + if (bytes < nval) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Truncated input file"); return (ARCHIVE_FATAL);