diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/decompress_unlzma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c index f30c899241ef..476c65af9709 100644 --- a/lib/decompress_unlzma.c +++ b/lib/decompress_unlzma.c | |||
@@ -522,6 +522,9 @@ static inline int INIT process_bit1(struct writer *wr, struct rc *rc, | |||
522 | cst->rep0 = pos_slot; | 522 | cst->rep0 = pos_slot; |
523 | if (++(cst->rep0) == 0) | 523 | if (++(cst->rep0) == 0) |
524 | return 0; | 524 | return 0; |
525 | if (cst->rep0 > wr->header->dict_size | ||
526 | || cst->rep0 > get_pos(wr)) | ||
527 | return -1; | ||
525 | } | 528 | } |
526 | 529 | ||
527 | len += LZMA_MATCH_MIN_LEN; | 530 | len += LZMA_MATCH_MIN_LEN; |