mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Fix decoding of Extra Records that have empty Data.
This commit is contained in:
parent
e5fdec93e2
commit
3a7cc5c3de
1 changed files with 12 additions and 1 deletions
|
@ -356,7 +356,18 @@ process(lzma_coder *coder, lzma_allocator *allocator)
|
|||
case SEQ_EXTRA_SIZE:
|
||||
case SEQ_EXTRA_DUMMY_SIZE:
|
||||
read_vli(coder->tmp);
|
||||
++coder->sequence;
|
||||
|
||||
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 a new issue