each folder requires at least one coder
@@ -1083,6 +1083,9 @@ private int sanityCheckFolder(final ByteBuffer header, final ArchiveStatistics s
throws IOException {
final int numCoders = assertFitsIntoNonNegativeInt("numCoders", readUint64(header));
+ if (numCoders == 0) {
+ throw new IOException("Folder without coders");
+ }
stats.numberOfCoders += numCoders;
long totalOutStreams = 0;
