Commit e0fcc69
committed
gh-51067: Bound _validate_local_file_entry to the scanned gap
Without this check a stale local header whose compress_size points past
the next referenced entry would make _validate_local_file_entry_sequence
report more strippable bytes than the gap holds. The move loop would
then over-advance entry_offset, drive a later header_offset negative,
and fail in fp.seek() with the archive partially rewritten.1 parent cbae620 commit e0fcc69
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1696 | 1696 | | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | | - | |
| 1699 | + | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
1704 | 1704 | | |
1705 | 1705 | | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
1706 | 1713 | | |
1707 | 1714 | | |
1708 | 1715 | | |
| |||
0 commit comments