diff options
-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 696c34a274cf..4281aa9cb76c 100644 --- a/lib/decompress_unlzma.c +++ b/lib/decompress_unlzma.c | |||
@@ -631,6 +631,8 @@ STATIC inline int INIT unlzma(unsigned char *buf, int in_len, | |||
631 | if (cst.rep0 == 0) | 631 | if (cst.rep0 == 0) |
632 | break; | 632 | break; |
633 | } | 633 | } |
634 | if (rc.buffer_size <= 0) | ||
635 | goto exit_3; | ||
634 | } | 636 | } |
635 | 637 | ||
636 | if (posp) | 638 | if (posp) |
@@ -638,6 +640,7 @@ STATIC inline int INIT unlzma(unsigned char *buf, int in_len, | |||
638 | if (wr.flush) | 640 | if (wr.flush) |
639 | wr.flush(wr.buffer, wr.buffer_pos); | 641 | wr.flush(wr.buffer, wr.buffer_pos); |
640 | ret = 0; | 642 | ret = 0; |
643 | exit_3: | ||
641 | large_free(p); | 644 | large_free(p); |
642 | exit_2: | 645 | exit_2: |
643 | if (!output) | 646 | if (!output) |