Commit e313fe6
committed
Improve corruption detection: ZIP cross-validation, BEAM chunks, OTF checksums
ZIP: Cross-validate central directory vs local file header fields
(compression method, CRC-32, sizes, filename length). Catches corruption
in ZIP metadata that per-entry CRC alone misses. Fixes xlsx to 5/5.
BEAM: Validate chunk name is printable ASCII, require StrT/ImpT/ExpT
chunks, cross-validate ImpT/ExpT/LocT entry count × entry size against
chunk size, validate Code chunk header, verify chunks exactly fill FOR1
container. Upgrades from structural to full depth. Now 4/5.
OTF: Reorder checksum checks — verify whole-file checkSumAdjustment
before head table, detect head table data corruption via raw checksum
change vs directory entry. Replace ground truth with properly-checksummed
NotoSans OTF. Now 5/5.
Strict coverage: 71 pass (was 69), 0 corrupt_fail (was 1).1 parent 9856633 commit e313fe6
4 files changed
Lines changed: 129 additions & 24 deletions
File tree
- ground_truth_examples/otf
- src/core
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
1677 | 1681 | | |
1678 | 1682 | | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
1679 | 1714 | | |
1680 | 1715 | | |
1681 | 1716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
| 293 | + | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | 314 | | |
317 | 315 | | |
318 | 316 | | |
319 | 317 | | |
320 | 318 | | |
321 | 319 | | |
322 | | - | |
323 | 320 | | |
324 | 321 | | |
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
330 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
331 | 342 | | |
332 | 343 | | |
333 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5790 | 5790 | | |
5791 | 5791 | | |
5792 | 5792 | | |
| 5793 | + | |
| 5794 | + | |
| 5795 | + | |
5793 | 5796 | | |
5794 | 5797 | | |
5795 | 5798 | | |
| |||
5799 | 5802 | | |
5800 | 5803 | | |
5801 | 5804 | | |
| 5805 | + | |
| 5806 | + | |
| 5807 | + | |
| 5808 | + | |
| 5809 | + | |
| 5810 | + | |
| 5811 | + | |
| 5812 | + | |
5802 | 5813 | | |
5803 | 5814 | | |
| 5815 | + | |
| 5816 | + | |
| 5817 | + | |
5804 | 5818 | | |
5805 | 5819 | | |
| 5820 | + | |
| 5821 | + | |
| 5822 | + | |
| 5823 | + | |
| 5824 | + | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
| 5836 | + | |
| 5837 | + | |
| 5838 | + | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
| 5843 | + | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
5806 | 5857 | | |
5807 | 5858 | | |
5808 | 5859 | | |
| |||
5812 | 5863 | | |
5813 | 5864 | | |
5814 | 5865 | | |
5815 | | - | |
5816 | | - | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
| 5870 | + | |
| 5871 | + | |
| 5872 | + | |
| 5873 | + | |
| 5874 | + | |
| 5875 | + | |
5817 | 5876 | | |
5818 | 5877 | | |
5819 | 5878 | | |
| |||
0 commit comments