1
0
zrcadlo https://git.tukaani.org/xz.git synchronizováno 2025-09-16 07:28:30 +00:00

Fix Subblock docoder: If Subblock filter was used with known

Uncompressed Size, and the last output byte was from RLE,
the code didn't stop decoding as it should have done.
Tento commit je obsažen v:
Lasse Collin 2008-01-17 13:14:20 +02:00
rodič bc0b945ca3
revize f88590e001

Zobrazit soubor

@ -363,6 +363,7 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator,
return LZMA_DATA_ERROR; return LZMA_DATA_ERROR;
if (coder->repeat.count == 0) { if (coder->repeat.count == 0) {
assert(coder->subfilter.code == NULL);
if (coder->uncompressed_size == 0) if (coder->uncompressed_size == 0)
return LZMA_STREAM_END; return LZMA_STREAM_END;
} else { } else {
@ -424,6 +425,11 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator,
} }
} while (*out_pos < out_size); } while (*out_pos < out_size);
// Check if we have decoded all the data.
if (coder->uncompressed_size == 0
&& coder->subfilter.code == NULL)
return LZMA_STREAM_END;
break; break;
case SEQ_DATA: { case SEQ_DATA: {