aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-09-30 13:57:44 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-09-30 13:57:44 +0300
commit8e60c889a2816a63013a35c99ce26bf28f5b78eb (patch)
tree63504673f8627ec9d56c08ab58fc3202db25cdbd
parentAdded one more test file. (diff)
downloadxz-8e60c889a2816a63013a35c99ce26bf28f5b78eb.tar.xz
Fixed Stream decoder to actually use the first_stream variable.
-rw-r--r--src/liblzma/common/stream_decoder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/liblzma/common/stream_decoder.c b/src/liblzma/common/stream_decoder.c
index ab5f2afd..e137685f 100644
--- a/src/liblzma/common/stream_decoder.c
+++ b/src/liblzma/common/stream_decoder.c
@@ -128,6 +128,11 @@ stream_decode(lzma_coder *coder, lzma_allocator *allocator,
return ret == LZMA_FORMAT_ERROR && !coder->first_stream
? LZMA_DATA_ERROR : ret;
+ // If we are decoding concatenated Streams, and the later
+ // Streams have invalid Header Magic Bytes, we give
+ // LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
+ coder->first_stream = false;
+
// Copy the type of the Check so that Block Header and Block
// decoders see it.
coder->block_options.check = coder->stream_flags.check;