]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Only call rar_br_preparation once.
authorAndres Mejia <amejia004@gmail.com>
Sun, 7 Aug 2011 21:55:23 +0000 (17:55 -0400)
committerAndres Mejia <amejia004@gmail.com>
Sun, 7 Aug 2011 21:55:23 +0000 (17:55 -0400)
SVN-Revision: 3555

libarchive/archive_read_support_format_rar.c

index 40dff820385b51a547939b3f19bdf43fd34b1a3d..352901693df688d1affb351157bb34f060d5c2cb 100644 (file)
@@ -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);