From: Andres Mejia Date: Sun, 7 Aug 2011 21:55:23 +0000 (-0400) Subject: Only call rar_br_preparation once. X-Git-Tag: v3.0.0a~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d823e53bc9b3f122ccac99b0ee0b9f8652ad8a31;p=thirdparty%2Flibarchive.git Only call rar_br_preparation once. SVN-Revision: 3555 --- diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c index 40dff8203..352901693 100644 --- a/libarchive/archive_read_support_format_rar.c +++ b/libarchive/archive_read_support_format_rar.c @@ -1316,7 +1316,8 @@ read_data_compressed(struct archive_read *a, const void **buff, size_t *size, return ret; } - if ((ret = rar_br_preparation(a, &(rar->br))) < ARCHIVE_WARN) + if (!rar->br.next_in && + (ret = rar_br_preparation(a, &(rar->br))) < ARCHIVE_WARN) return (ret); if (rar->start_new_table && ((ret = parse_codes(a)) < (ARCHIVE_WARN))) return (ret);