diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libarchive/decompress_unlzma.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archival/libarchive/decompress_unlzma.c b/archival/libarchive/decompress_unlzma.c index 0744f23..fb5aac8 100644 --- a/archival/libarchive/decompress_unlzma.c +++ b/archival/libarchive/decompress_unlzma.c @@ -290,8 +290,11 @@ unpack_lzma_stream(transformer_state_t *xstate) uint32_t pos; pos = buffer_pos - rep0; - if ((int32_t)pos < 0) + if ((int32_t)pos < 0) { pos += header.dict_size; + if ((int32_t)pos < 0) + goto bad; + } match_byte = buffer[pos]; do { int bit; |