diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-04 21:37:01 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-04 21:37:01 +0200 |
commit | fc67f79f607cbfa78c6f47a69dec098d8659b162 (patch) | |
tree | 85f4381ac9c5cbd6f53b615a1908fa44b644bfde /src/liblzma/lz | |
parent | Added support for flush marker, which will be in files (diff) | |
download | xz-fc67f79f607cbfa78c6f47a69dec098d8659b162.tar.xz |
Fix stupid bugs in flush marker detection.
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/lzma/lzma_decoder.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c index 037985ce..90531c8d 100644 --- a/src/liblzma/lzma/lzma_decoder.c +++ b/src/liblzma/lzma/lzma_decoder.c @@ -488,14 +488,14 @@ decode_real(lzma_coder *restrict coder, const uint8_t *restrict in, // flush marker or the beginning of the stream. // This is to prevent hanging the decoder with // malicious input files. - if (!coder->has_produced_output) + if (!has_produced_output) return true; - coder->has_produced_output = false; + has_produced_output = false; rc_reset(rc); if (!rc_read_init(&rc, in, &in_pos_local, in_size)) - break; + goto out; // Avoiding rc_normalize() } else { return true; @@ -622,6 +622,7 @@ decode_real(lzma_coder *restrict coder, const uint8_t *restrict in, // Update the *data structure. // ///////////////////////////////// +out: // Range decoder rc_from_local(coder->rc); |