diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2007-12-09 11:24:48 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2007-12-09 11:24:48 +0200 |
commit | ff946ceb7975d4f11950afd33f6315b4d20d1a03 (patch) | |
tree | 6240c77a7cb09f0fb95c54118f22121a403e800d | |
parent | Fixed the tests to build with -Werror. (diff) | |
download | xz-ff946ceb7975d4f11950afd33f6315b4d20d1a03.tar.xz |
Re-enabled the security checks in Subblock decoder
that were disabled for debugging reasons.
-rw-r--r-- | src/liblzma/subblock/subblock_decoder.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/subblock/subblock_decoder.c b/src/liblzma/subblock/subblock_decoder.c index ef3c289f..e0a46f45 100644 --- a/src/liblzma/subblock/subblock_decoder.c +++ b/src/liblzma/subblock/subblock_decoder.c @@ -177,9 +177,9 @@ decode_buffer(lzma_coder *coder, lzma_allocator *allocator, switch (in[*in_pos] >> 4) { case FLAG_PADDING: // Only check that reserved bits are zero. -// if (++coder->padding > PADDING_MAX -// || in[*in_pos] & 0x0F) -// return LZMA_DATA_ERROR; + if (++coder->padding > PADDING_MAX + || in[*in_pos] & 0x0F) + return LZMA_DATA_ERROR; ++*in_pos; break; |