From ff946ceb7975d4f11950afd33f6315b4d20d1a03 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 9 Dec 2007 11:24:48 +0200 Subject: [PATCH] Re-enabled the security checks in Subblock decoder that were disabled for debugging reasons. --- src/liblzma/subblock/subblock_decoder.c | 6 +++--- 1 file 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;