mirror of https://git.tukaani.org/xz.git
Fix decoding of Extra Records that have empty Data.
This commit is contained in:
parent
e5fdec93e2
commit
3a7cc5c3de
|
@ -356,7 +356,18 @@ process(lzma_coder *coder, lzma_allocator *allocator)
|
|||
case SEQ_EXTRA_SIZE:
|
||||
case SEQ_EXTRA_DUMMY_SIZE:
|
||||
read_vli(coder->tmp);
|
||||
|
||||
if (coder->tmp == 0) {
|
||||
// We have no Data in the Extra Record. Don't
|
||||
// allocate any memory for it. Go back to
|
||||
// SEQ_EXTRA_ALLOC or SEQ_EXTRA_DUMMY_ALLOC.
|
||||
coder->tmp = 0;
|
||||
coder->sequence -= 2;
|
||||
coder->todo_count = 0;
|
||||
} else {
|
||||
++coder->sequence;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SEQ_EXTRA_DATA_ALLOC: {
|
||||
|
|
Loading…
Reference in New Issue